Reputation: 1
This is the error when i tried to start a react application by npm start
command
npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\DELL\Desktop\works\package.json npm ERR! errno -4058 npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\DELL\Desktop\works\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\DELL\AppData\Roaming\npm-cache\_logs\2020-03-06T11_16_42_885Z-debug.log
Upvotes: 0
Views: 82
Reputation: 931
Usually, this type of error occurs with an incompatible version of npm and nodejs. Try to upgrade your npm and node, if you are using ubuntu os you can do it with below commands:
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node//bin/node /usr/bin/nodejs
for windows do it like this:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade
For more details visit this link here https://github.com/felixrieseberg/npm-windows-upgrade
Upvotes: 2