I stumbled over this discussion:
https://github.com/nodejs/node/issues/3675
when googling this error:
{ Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
at onErrorNT (internal/child_process.js:415:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn npm',
path: 'npm',
spawnargs: [ 'root', '-g' ] }
but I dont know how to access this npm.cmd. I was on their site https://www.npmjs.com/package/node-cmd
and I installed it with npm install node-cmd
but Im pretty clueless how to run it, Im getting errors like this when typing
npm run node-cmd
npm ERR! path D:\nodeJS\node-v10.16.0-win-x64\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'D:\nodeJS\node-v10.16.0-win-x64\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
Basically, I want to run this node-cmd inside my project so I can (hopefully) execute:
npx webpack-cli init
successfully
if you're running under win32 try for example:
When installing packages
npm.cmd install
or Run npm scripts syncrhonously
npm.cmd run sync -- --init
Related
Could anyone please help me with fixing my NPM installation?
It was working a couple of months ago, but then I tried to launch it recently and nothing is working.
I can't install it, or launch it.
I am very new to all this and any help would be highly appreciated.
npm install throws error:
eugenesoch#Eugenes-iMac ~ % npm install
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/eugenesoch/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/eugenesoch/package.json'
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! /Users/eugenesoch/.npm/_logs/2023-02-18T17_42_39_222Z-debug-0.log
npm start throws error:
eugenesoch#Eugenes-iMac ~ % npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/eugenesoch/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/eugenesoch/package.json'
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! /Users/eugenesoch/.npm/_logs/2023-02-18T17_44_40_679Z-debug-0.log
eugenesoch#Eugenes-iMac ~ %
I tried installing, tried even using sudo npm install, but nothing worked.
As said, I am quite new to all this and might not know everything, so would really appreciate someone pointing me in the right direction.
Many thanks!
I am trying to include the GIT package https://github.com/Denglo/bs5-autocomplete-vanillaJS.git into my (simple) project. This currently only has two other packages:
"dependencies": {
"bootstrap": "latest",
"bootstrap-icons": "latest"
}
Running a npm install with the above works without an issue, but when I run any of the following
npm install git+https://github.com/Denglo/bs5-autocomplete-vanillaJS.git
or
npm install https://github.com/Denglo/bs5-autocomplete-vanillaJS.git
or
npm install github:Denglo/bs5-autocomplete-vanillaJS
I get the following error:
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path ~/.npm/_cacache/tmp/git-cloneHYQNgb/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '~/.npm/_cacache/tmp/git-cloneHYQNgb/package.json'
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! ~/.npm/_logs/2022-07-22T09_37_33_747Z-debug-0.log
The ~/.npm/_cacache/tmp directory exists and the user has full access to it. The error log does not says the same as above. I also tried to manually add the line to the package.json, but that resulted in the same error.
Any ideas how I can solve this?
i am trying to install "npx create-react-app new" it successfully installs, however "npm start" shows error:
PS D:\react project\new> npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path D:\react project\new/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'D:\react project\new\package.json'
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\user\AppData\Local\npm-cache\_logs\2022-03-15T08_51_51_601Z-debug.log
PS D:\react project\new>
I checked my package.json, it looks fine, anyone can suggest whats the issue here?
First of all run:
npm run start
if it did not work then delete the node-module folder and use
npm i or npm install
this will work for you.
I am installing Yeoman on my machine and ran this
npm install -g yo
This is giving me permission error:
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo'] {
npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/nvm/versions/node/v12.16.1/lib/node_modules/yo'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/siddharth/.npm/_logs/2020-04-24T22_31_29_025Z-debug.log
But this got resolved by attaching sudo
Now I am getting this error:
Yeoman Doctor
Running sanity checks on your system
✔ No .bowerrc file in home directory
✔ Global configuration file is valid
✔ NODE_PATH matches the npm root
✔ No .yo-rc.json file in home directory
✔ Node.js version
✔ npm version
Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn yo',
path: 'yo',
spawnargs: [ '--version' ],
cmd: 'yo --version'
}
✖ yo version
Error: Couldn't find the 'yo' binary. Make sure it's installed and in your $PATH
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn yo',
path: 'yo',
spawnargs: [ '--version' ],
cmd: 'yo --version'
}
Found potential issues on your machine :(
+ yo#3.1.1
updated 1 package in 29.492s
Running yo --version is giving zsh: command not found: yo
I tried this https://stackoverflow.com/a/58277450/10309895 but this is also not working for me
:,(
I am trying to install the latest mfpdev-cli version (8.0.2016062816) but I got the following error:
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "mfpdev-cli"
npm ERR! node v6.2.1
npm ERR! npm v3.9.3
npm ERR! path /usr/local/lib/node_modules/mdo-browser-support
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/usr/local/lib/node_modules/mdo-browser-support'
npm ERR! enoent ENOENT: no such file or directory, open '/usr/local/lib/node_modules/mdo-browser-support'
npm ERR! enoent
This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! anoint
Checking the repository, I was not able to find the mdo-* modules, this is the problem.
I also tried to install it through the .tar.gz file, but same error.
Is there a "workaround" on this issue?
Try :
sudo npm install -g mfpdev-cli#8.0.2016062416 --no-optional
Looks like newer builds have an issue.
Try to run the install with "sudo".
sudo npm install -g mfpdev-cli