PS C:\Users\USER\Desktop\react> npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\USER\Desktop\react\package.json
npm ERR! errno -4058
'C:\Users\USER\Desktop\react\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\Roaming\npm-cache_logs\2020-10-15T10_23_32_090Z-debug.log
It looks like you're trying to run an npm script such as "npm start" in a folder that doesn't have a "package.json" file. Make sure you are in your React project's working directory and try again.
I am having this error when starting npm start, it seems that it is not finding the file package.json.
But I'm not sure if that's right, could someone help me?
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Projetos\omnistack\aulas\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Projetos\omnistack\aulas\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\Thiago Magalhães\AppData\Roaming\npm-cache\_logs\2020-06-26T22_51_26_639Z-debug.log
i getting this type of error while running the other project in my Linux system.
sh: 1: babel-node: not found
npm ERR! code ELIFECYCLE
npm ERE! syscall spawn
npm ERR! file sh
npm ERR! ENOENT errno
npm ERR! react-native-activity-feed-showcase#.1.0 init-data: babel-node scripts/initData.js
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the init-data script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I have node v7.10.1 and npm v4.2.0 installed on my ubuntu 16.04 os. When I run start npm or sudo start npm I get the below error. It was working this morning now I am getting errors. Please assist
npm ERR! Linux 4.10.0-32-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! path /home/dombo/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open
'/home/dombo/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '
/home/dombo/package.json'
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! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/dombo/.npm/_logs/2017-08-18T20_04_33_148Z-debug.log
The problem is that npm can't find your package.json. Be sure that file exists, and you are in the same directory before running npm start.
Make sure that /home/dombo/package.json file exists. It is possible that you are in the wrong directory.
I could install gruntjs locally using npm install grunt.
But when I'm trying to install it globally npm install grunt -g, i'm getting an error:
npm ERR! Error: EACCES, symlink '../lib/node_modules/grunt/bin/grunt'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 2.6.18-92.el5xen
npm ERR! command "nodejs" "/usr/bin/npm" "install" "grunt" "-g"
npm ERR! cwd /home/lj
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
npm ERR! path ../lib/node_modules/grunt/bin/grunt
npm ERR! code EACCES
npm ERR! message EACCES, symlink '../lib/node_modules/grunt/bin/grunt'
npm ERR! errno {}
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR!
npm ERR! System Linux 2.6.18-92.el5xen
npm ERR! command "nodejs" "/usr/bin/npm" "install" "grunt" "-g"
npm ERR! cwd /home/lj
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! message EACCES, open 'npm-debug.log'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/lj/npm-debug.log
npm not ok
With sudo I have error too:
npm ERR! Error: spawn ENOENT
npm ERR! at errnoException (child_process.js:483:11)
npm ERR! at ChildProcess.spawn (child_process.js:446:11)
npm ERR! at child_process.js:342:9
npm ERR! at Object.execFile (child_process.js:252:15)
npm ERR! at uidNumber (/usr/lib/nodejs/uid-number/uid-number.js:33:17)
npm ERR! at loadUid (/usr/lib/nodejs/npm/lib/npm.js:336:5)
npm ERR! at Array.2 (/usr/lib/nodejs/bind-actor.js:15:8)
npm ERR! at LOOP (/usr/lib/nodejs/chain.js:15:13)
npm ERR! at /usr/lib/nodejs/chain.js:18:7
npm ERR! at setUser (/usr/lib/nodejs/npm/lib/npm.js:346:32)
npm ERR! You may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR!
npm ERR! System Linux 2.6.18-92.el5xen
npm ERR! command "nodejs" "/usr/bin/npm" "install" "grunt" "-g"
npm ERR! cwd /home/lj
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.19
npm ERR! syscall spawn
npm ERR! code ENOENT
npm ERR! message spawn ENOENT
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/lj/npm-debug.log
npm not ok
What could I do to install it?
P.S. It's possible that come rights for some folders is for root:root, not for my user. Cuz our admins installed VM that way...
I've had this problem too with grunt and bower
The solution I've found is in this article NPM config
In your .npmrc you need to set the prefix path
prefix = /usr/local
or you can do it from terminal like this:
npm config set prefix "/usr/local"
This way node will know where to install them:
In npm 1.0, there are two ways to install things:
globally —- This drops modules in {prefix}/lib/node_modules, and puts executable files in {prefix}/bin, where {prefix} is usually something like /usr/local. It also installs man pages in {prefix}/share/man, if they’re supplied.
locally —- This installs your package in the current working directory. Node modules go in ./node_modules, executables go in ./node_modules/.bin/, and man pages aren’t installed at all.
Try chowning the node_modules folder and then try to install again:
sudo chown -R $USER /path/to/node_modules/folder
Encountered same issue. The following works for me:
sudo npm install -g grunt-cli
try sudo npm install -g grunt ?
Adding the option --no-bin-links works good. I tried everything and only this solved my problem. I was installing the Yeoman on ubuntu 12.04 and it was always returning the error:
npm ERR! Error: EACCES, symlink '../lib/node_modules/yo/cli.js'
Then, I did:
npm install -g --no-bin-links yo
=D
For more details https://github.com/isaacs/npm/issues/2380