Cordova Ionic serve命令不会检测到保存更改,也不会自动重新加载

Cordova Ionic serve命令不会检测到保存更改,也不会自动重新加载,cordova,angular,ionic-framework,npm,ionic2,Cordova,Angular,Ionic Framework,Npm,Ionic2,在使用我的ionic 2应用程序时,我遇到了一个有线问题。 当我点击ionic-serve命令时,它会启动本地主机上的服务器。结果如下 [12:00:45] ionic-app-scripts 0.0.45 [12:00:46] watch started ... [12:00:46] build dev started ... [12:00:46] clean started ... [12:00:46] clean finished in 31 ms [12:00:46]

在使用我的
ionic 2
应用程序时,我遇到了一个有线问题。 当我点击
ionic-serve
命令时,它会启动本地主机上的服务器。结果如下

[12:00:45]  ionic-app-scripts 0.0.45 
[12:00:46]  watch started ... 
[12:00:46]  build dev started ... 
[12:00:46]  clean started ... 
[12:00:46]  clean finished in 31 ms 
[12:00:46]  copy started ... 
[12:00:46]  transpile started ... 
[12:00:52]  transpile finished in 6.08 s 
[12:00:52]  webpack started ... 
[12:00:53]  copy finished in 6.93 s 
[12:01:03]  webpack finished in 10.36 s 
[12:01:03]  sass started ... 
[12:01:04]  sass finished in 1.61 s 
[12:01:04]  build dev finished in 18.14 s 
[12:01:05]  watch ready in 18.62 s 
[12:01:05]  dev server running: http://localhost:8100/ 
以下是我在
package.json
文件中的脚本配置

"scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
但是如果我更改了一些
.ts
文件并保存了它,那么爱奥尼亚服务器不会检测到该更改。
我必须到终端并输入
ctrl+c
,然后使用
爱奥尼亚服务
命令重新启动服务器

但我目前的工作部门在其他计算机上运行正常。他们没有面临这个问题。因此,我重新安装了
ionic 2
npm
,并根据此()清除了缓存文件。但这并不能解决问题。但如果我运行另一个应用程序,它就会正确运行并自动检测我的保存更改


现在我不明白出了什么问题。任何人对此都有想法。谢谢。

我在
packege.json
中的脚本运行良好,您可以尝试:

"scripts": {
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "emulate:before": "build",
    "deploy:before": "build",
    "build:before": "build",
    "run:before": "build"
  },

我在
packege.json
中的脚本运行良好,您可以尝试:

"scripts": {
    "build": "ionic-app-scripts build",
    "watch": "ionic-app-scripts watch",
    "serve:before": "watch",
    "emulate:before": "build",
    "deploy:before": "build",
    "build:before": "build",
    "run:before": "build"
  },

如果你的爱奥尼亚应用程序的文件路径有不必要的字符(空白、斜杠等),那么在编译时就可以查看“连接”。所以要避开它们。字符串分隔仅使用下划线。然后可以克服这个问题:)

如果你的爱奥尼亚应用程序的文件路径有不必要的字符(空白、斜杠等),那么就在编译时观看“连线”。所以要避开它们。字符串分隔仅使用下划线。然后可以克服这个问题:)

否。相同的浏览器适用于其他项目:(否。相同的浏览器适用于其他项目:(找到解决方案了吗?是的。如果你的爱奥尼亚应用程序的文件路径有不必要的字符(空白、斜杠等),然后在编译时观看连接。因此,请避免。仅使用下划线作为字符串分隔。get any solution的可能重复?是的。如果你的ionic应用程序文件路径包含不必要的字符(空白、斜杠等),然后在编译时连接手表。因此,请避免。仅使用下划线作为字符串分隔符可能重复