“ionic serve”失败且没有错误

‘ionic serve’ is failing without an error

重置 git head one commit back 并确认 ionic 更新后,ionic serve 在 'build dev started...' 上退出,没有错误:/

我已尝试使用 npm update 从项目结束安装中删除 package.lock.jsonnode_modules 文件夹 - 问题未解决

然后我发现在另一个 ionic 项目上,ionic 也没有工作,有同样的问题。

ionic serve
[WARN] No local CLI detected.
       Starting with CLI 3.6, the CLI must be installed locally to use local CLI plugins.

? Install now? Yes

> npm install --save-dev --save-exact ionic@latest
✔ Running command - done!
[OK] Installed Ionic CLI locally!

Please re-run your command.
ctibor:client lucky$ ionic serve
? Local plugin @ionic/cli-plugin-cordova has an update available (1.4.1 => 1.6.2)! Would you like to install it? Yes
> npm install --save-dev --save-exact @ionic/cli-plugin-cordova@latest
✔ Running command - done!
[OK] Updated @ionic/cli-plugin-cordova to 1.6.2! 
? Local plugin @ionic/cli-plugin-ionic-angular has an update available (1.3.2 => 1.4.1)! Would you like to install it? Yes
> npm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest
✔ Running command - done!
[OK] Updated @ionic/cli-plugin-ionic-angular to 1.4.1! 
> npm dedupe
✔ Running command - done!

离子发球

[INFO] Starting app-scripts server: --port 8100 --p 8100 --livereload-port 35729 --r 35729 --address localhost - Ctrl+C
       to cancel
[06:34:13]  watch started ... 
[06:34:13]  build dev started ... 
user:folder username$

离子信息

cli 包:(/Users/lucky/Documents/projects/bubuc/client/node_modules)

@ionic/cli-plugin-cordova       : 1.6.2
@ionic/cli-plugin-ionic-angular : 1.4.1
@ionic/cli-utils                : 1.7.0
ionic (Ionic CLI)               : 3.7.0

全局包:

Cordova CLI : 7.0.1 

本地包:

@ionic/app-scripts : 1.3.7
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.6.0

系统:

Node       : v6.9.5
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b 
ios-deploy : 1.9.1 
ios-sim    : 5.0.13 
npm        : 5.3.0 

重启整台机器解决了这个问题!

编辑(14.aug.2017):我发现这只是两个 'ionic serve' 进程的冲突。从现在开始,拥有多个 ionic serve 实例就没有问题了,例如当我同时打开两个项目时。此问题在 Starting with CLI 3.6, the CLI must be installed locally to use local CLI plugins. 更新后出现。所以从现在开始,取消其他进程就可以解决问题了。