I'm runnig command :
npm install udev
And I'm getting this error:
npm WARN enoent ENOENT: no such file or directory, open '/home/mitesh/package.json'
npm WARN mitesh No description
npm WARN mitesh No repository field.
npm WARN mitesh No README data
npm WARN mitesh No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! udev#0.6.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the udev#0.6.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/mitesh/.npm/_logs/2020-03-16T11_44_35_032Z-debug.log
Looks like you do not have a package.json in your project or it is probably not rightly placed. Here is what you can do;
Browse to your project directory and run this command;
npm init
This should create a package.json file in your project directory
Then run,
npm install udev --save
--save will ensure your module is saved as a dependency in your package.json file.
you could just try to run the last command without the --save but in some cases it helps
Here is a link to further assist: npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Nuwanst\package.json'
Try this let me know if it helps.
Related
when i type npm command create-react-app my-app i have error like this :
npm ERR! code ENOENT
npm ERR! syscall spawn C:\Windows\System32;
npm ERR! path C:\Users\Administrator\Documents\th-wedding\template
npm ERR! errno -4058
npm ERR! enoent spawn C:\Windows\System32; ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2023-02-02T04_41_46_601Z-debug-0.log
I've tried every way, from setting up the env, and reinstalling with a different version, but still the error
ENOENT means There is no directory exists with this name
Now You need to check several points:
Check the version of node js & npm (check version installed is proper)
remove cache (npm cache clean --force or npm cache clean)
verify removed cache (npm cache verify --force or npm cache verify)
check the installed version or install the new version or re-install again of react react-dom react-scripts using (npm install --save react create-react-app)
then create a new app using npx create-react-app app-name
Of If your project is already created then install necessary dependencies using (npm install)
I have workspace with several packages and plan to reference one to other.
+ root
|-+ packages
|-+ openapi-jsdoc
|-+ api-1
|-+ api-2
My api-1 and api-2 would like to use openapi-jsdoc, which in my imagination is as easy as doing cd packages/api-1; npm install ../openapi-jsdoc. But it is not, and found weird errors.
$ npm install ../packages/openapi-jsdoc
npm ERR! Cannot set properties of null (setting 'dev')
$ npm install packages/openapi-jsdoc
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git#github.com/packages/openapi-jsdoc.git
npm ERR! ERROR: Repository not found.
npm ERR! fatal: Could not read from remote repository.
$ npm install git+file:packages/openapi-jsdoc/
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote file://packages/openapi-jsdoc/
Is there any concept of workspace I'm missed out. Then, how to do this correctly?
Lately, I found out that with every package I want to install I keep getting a error. Its always the same.
What I've tried:
Updating node/NPM
Repairing node/NPM
Fixing git bash in path variable.
Deleting package-lock.json and running npm install
Deleting node_modules and package-lock.json and running npm install.
Clearing npm cache
Manually creating the folder it says it can't find. However, this doesn't change anything.
Manually adding the npm package to package-JSON. running npm install but again. results in an error.
Packages installed fine at first. This has been like this for a week or 2.
short error:
npm ERR! code ENOENT
npm ERR! syscall spawn bash
npm ERR! path C:\Users\Timsl\Documents\FarCryDiscordBot\node_modules\better-sqlite3
npm ERR! errno -4058
npm ERR! enoent spawn bash ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
full log:
https://pastebin.com/1B4yLCLK
My npm version is 3.10.10
And node version is v7.2.1
And when I tried to install electron in ubuntu via :
sudo npm install electron --save-dev
I get error like this :
Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TLSWrap.onread (net.js:572:26)
npm WARN enoent ENOENT: no such file or directory, open '/home/dotmark/package.json'
npm WARN dotmark No description
npm WARN dotmark No repository field.
npm WARN dotmark No README data
npm WARN dotmark No license field.
npm ERR! Linux 3.13.0-87-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "electron" "--save-dev"
npm ERR! node v7.2.1
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! electron#1.4.13 postinstall: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron#1.4.13 postinstall script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs electron
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls electron
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/dotmark/npm-debug.log
You can't add a module to the dependencies of the package you are writing (--save-dev) unless you first create a package (with npm init or by manually writing a package.json).
… but don't make the root of your package your own home directory. Create a directory for it.
I'm getting an error when trying to run:
$babel-node ./server.js
The CLI has been moved into the package babel-cli.
$ npm install -g babel-cli
When I install it and run it again it asks again for it.
Anyone came across this situation? Can't seem to move forward.
>
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v5.1.0
npm ERR! npm v3.5.0
npm ERR! code ELIFECYCLE
npm ERR! relay-starter-kit#0.1.0 start: `babel-node ./server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the relay-starter-kit#0.1.0 start script 'babel-node ./server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the relay-starter-kit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node ./server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls relay-starter-kit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/diogo/Projects/cf-ophite/npm-debug.log
Babel Version 6 split some packages.
Did you try to open a new terminal window after
npm install -g babel-cli ?
You can also install version 5 and work as before:
npm install -g babel#5
If this happens after upgrading node, try npm rebuild in your project directory
Another solution is to delete the node_modules folder, and execute npm install again