在为 Vue.js 应用程序设置环境时,我遇到了与 node_modules 和 nodemon 相关的 npm start 问题。运行 $npm start 命令时,我在控制台中收到此错误:
$ npm start
> server@1.0.0 start C:\Users\Michał\desktop\it\vueapptrain\server
> node .node_modules/nodemon/.bin/nodemon.js src/app.js --exec 'npm run lint && node'
module.js:515
throw err;
^
Error: Cannot find module 'C:\Users\Michał\desktop\it\vueapptrain\server\.node_modules\nodemon\.bin\nodemon.js'
at Function.Module._resolveFilename (module.js:513:15)
at Function.Module._load (module.js:463:25)
at Function.Module.runMain (module.js:653:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! server@1.0.0 start: `node .node_modules/nodemon/.bin/nodemon.js src/app.js --exec 'npm run lint && node'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the server@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
有什么想法可以解决这个问题吗?