0

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
1
  • Usually, this type of error occurs with an incompatible version of npm and nodejs. Try to upgrade your npm and node Commented Mar 6, 2020 at 11:26

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.