FullstackReactCode
FullstackReactCode copied to clipboard
Missing modules when running npm run build or npm install
Hi.
I am starting with the Udemy class on a server project and I am trying to get it all setup and working.
I have cloned the preexisting repository howoever every time I run pretty much any npm command I get the following output:
node index.js
module.js:327 throw err; ^
Error: Cannot find module './dev'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I have uninstalled node_modules completely and reinstalled it again.
rm -rf node_modules npm install provide the contents of that error message
It seems that I must have large dependency missing because every time I try to install the module that it says its missing it just complains about another module missing. Im a bit new to these package managers but aren't supposed to take care of all the dependencie.
Thank you.
hi @Jeffchiucp - this error is generated by this line (/Users/jchiu/Desktop/javascript/FullStackSteven/FullstackReactCode/server/config/keys.js:7:20), ie the keys file in the server > config folder. If you inspect it you see it asks for the dev file (.js is implicit). Just clone the server/config/prod.js and call it server/config/dev.js