简体   繁体   中英

npm run dev suddenly stopped working - Nuxt js

This is my terminal log, when I try to run npm run dev

cross-env HOST=0.0.0.0 PORT=3000 nuxt

module.js:545
throw err;
^

Error: Cannot find module '..'
at Function.Module._resolveFilename (module.js:543:15)
at Function.Module._load (module.js:470:25)
at Module.require (module.js:593:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/MYUSER/Desktop/PROJECTFOLDER/node_modules/.bin/nuxt:9:19)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! PROJECT@1.0.0 dev: `cross-env 
HOST=0.0.0.0 PORT=3000 nuxt`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the PROJECT@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/MYUSER/.npm/_logs/2019-03-14T08_05_59_626Z-debug.log

This happened all of a sudden after 1 week working on another project.

Sorry if my tags are incorrect. Feel free to correct them. Thanks in advance.

1.delete node_modules folder

2 .delete package-lock.json

then

npm install

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM