简体   繁体   English

npm run start引发错误。 找不到模块angular-cli

[英]npm run start throws an error. Can't find module angular-cli

I'm doing an 'npm run start' right after 'npm install'. 我在“ npm install”之后立即执行“ npm run start”。 I have tried deleting the node_modules folder and run 'npm run start' again. 我尝试删除node_modules文件夹,然后再次运行'npm run start'。 However i still get the same error : 但是我仍然得到同样的错误:

Error: Cannot find module 错误:找不到模块
/root/jenkins/workspace/Quality_Dashboard_backEnd_vmx1376/coc- ci/webapp_oden/node_modules/angular-cli/bin' at Function.Module._resolveFilename (module.js:469:15) at Function.Module._load (module.js:417:25) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7) at startup (bootstrap_node.js:149:9) at bootstrap_node.js:509:3 / root / jenkins / workspace / Quality_Dashboard_backEnd_vmx1376 / cocci / webapp_oden / node_modules / angular-cli / bin'位于Function.Module._resolveFilename(module.js:469:15),位于Function.Module._load(module.js:417) :25)在Module.runMain(module.js:604:10)在运行时(bootstrap_node.js:394:7)在启动时(bootstrap_node.js:149:9)在bootstrap_node.js:509:3

npm ERR! npm ERR! code ELIFECYCLE npm ERR! 代码ELIFECYCLE npm ERR! errno 1 npm ERR! errno 1 npm错误! dashboard-app@0.1.0 start: node ./node_modules/angular-cli/bin/ng serve --live-reload --host=0.0.0.0 npm ERR! dashboard-app@0.1.0开始: node ./node_modules/angular-cli/bin/ng serve --live-reload --host=0.0.0.0 npm ERR! Exit status 1 npm ERR! 退出状态1 npm ERR! npm ERR! npm ERR! Failed at the dashboard-app@0.1.0 start script. 在dashboard-app@0.1.0启动脚本处失败。 npm ERR! npm ERR! This is probably not a problem with npm. npm可能不是问题。 There is likely additional logging output above. 上面可能还有其他日志记录输出。

只需使用以下命令全局安装angular cli

 npm install -g @angular/cli

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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