error: enoent: no such file or directory angular code example
Example 1: npm ERR! enoent ENOENT: no such file or directory, open
rm -rf node_modules
npm install
git commit package-lock.json
git push
Example 2: An unhandled exception occurred: Script file ../node_modules/jquery/dist/jquery.min.js does not exist.
"./node_modules/jquery/dist/jquery.js",
"./node_modules/tether/dist/js/tether.js",
"./node_modules/bootstrap/dist/js/bootstrap.js"
Example 3: ENOENT, no such file or directory
Have you created a package.json file? Maybe run this command first again.
C:\Users\Nuwanst\Documents\NodeJS\3.chat>npm init
It creates a package.json file in your folder.
Then run,
C:\Users\Nuwanst\Documents\NodeJS\3.chat>npm install socket.io --save
The --save ensures your module is saved as a dependency in your package.json file.