After restarting my visual studio code nmp start command stopped working.It is showing the following errors.
$ npm start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path C:\Users\user\Desktop\project\package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open ‘C:\Users\user\Desktop\project\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\2021-03-01T13_40_24_218Z-debug.log.
How can I fix the problem?
Yes, it did work . That means it’s a problem with how you setup VSCode.
You have two options now:
Continue using the console (PowerShell) or
Fix the project setup.
It’s hard to help you with the second option since only you know how you initially setup the project. What did you initially do to run NPM inside Visual Studio Code?
Try to setup your project again (repeat the same steps and make a backup first).