简体   繁体   English

为什么打开项目目录后“离子服务”无法运行?

[英]Why “ionic serve” does not run once I open project directory?

屏幕截图

It doesn't work as an internal or external system command, once I open up my project directory to run "ionic serve". 一旦我打开项目目录以运行“离子服务”,它就不能用作内部或外部系统命令。 Even though "ionic" is recognized as a system command. 即使“离子”被识别为系统命令。 I have searched the internet but haven't found an answer yet that solves the problem. 我已经搜索了互联网,但尚未找到解决问题的答案。

尝试使用选项“ -g”进行全局安装:npm install -g ionic或npm install -g cordova

Delete data out of the cache folder, update npm and then install Ionic/Cordova. 缓存文件夹中删除数据, 更新 npm,然后安装 Ionic / Cordova。 After that try to run ionic serve . 之后,尝试运行ionic serve

npm cache clean
npm update -g
npm install -g ionic cordova

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

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