这是我尝试运行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
在另一个项目上工作了1周后,这种情况突然发生了。
对不起,如果我的标签不正确。随时纠正它们。预先感谢。
答案 0 :(得分:0)
1.删除 node_modules 文件夹
2 .delete package-lock.json
然后
npm install