I am a beginner, so my question may seem a bit stupid.
I have this problem when trying to run npm start
:
code: 'MODULE_NOT_FOUND', requireStack: [
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] watch: webpack --progress --watch
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] watch script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I think it happened because I accidentally deleted these files from my computer when deleting cache stuff. Then I used git recover
for all deleted files. But seems like they are still missing. Could you please help and explain why it's happening, thank you!
CodePudding user response:
did you try to run npm install
?
usually, the node_modules
folder isn't tracked by git (this would be accomplished by a .gitignore file on your main folder) so I would think git wouldn't have the info to restore it.
By doing npm install
you are going to check in your node_modules
folder to make sure that all your dependencies are installed and have the correct version (if there is no folder, it will create it, if there is one, it will update it). npm will take the information from a file named package.json
which is like the npm recipe to get the project up and running, sort of :)