I\'m getting following Console Error.
Error : Cannot find module
Here is the full error i\'m getting in console. What should I do?
same happen to me i just resolved by deleting "dist" file and re run the app.
Something weird happened to me last night.
I ran command node run watch
instead of npm run watch
.
I tried doing everything on this thread but nothing worked out for me. I was frustrated but eventually noticed that I ran the command wrong. I was laughing out loud. Sometimes this things happened. Enjoying learning Nodejs though.
Replace your file name in package.json
({"npm": <your server code file name>.js}
) with that file where your server code is running (it should be app.js
, main.js
, start.js
, server.js
, or whatever you picked up).
For me "npm install" again from command prompt worked. Command Prompt must be "Run as Administrator"
you need start server use follow command
npm start
or
yarn start
I was having the same error because I had a space at the end of my filename(not the reference but the actual filename). Once I changed 'app.js ' to 'app.js' it worked fine.