Ionic serve not working in Ionic 3

2019-02-21 00:25发布

My Ionic info:

cli packages: (/usr/lib/node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.1 

local packages:

@ionic/app-scripts : 3.1.0
Cordova Platforms  : browser 4.1.0
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v6.9.0
npm  : 3.10.8 
OS   : Linux 4.4

Ionic serve is working fine, but does not detect any file changes!

The problem appears only for Ionic v3 and v2 projects.

My Ionic v1 projects are working fine.

17条回答
劫难
2楼-- · 2019-02-21 00:40

Try below steps.. May be it will help

npm install -g ionic@latest

npm install @ionic/app-scripts@latest --save-dev

npm install ionic-angular@latest --save

ionic serve
查看更多
趁早两清
3楼-- · 2019-02-21 00:41

When I use ionic cli build app(ionic3 + angular5),same problem happened to me.I updated '@ionic/app-scripts' to version '3.1.6',then problem solved

查看更多
聊天终结者
4楼-- · 2019-02-21 00:41

You should not use "sudo" with any of the ionic/npm commands. If it throws error without "sudo", then you can fix it by changing the owner of the npm packages, using the command below:

sudo chown -R $(whoami) ~/.npm

查看更多
你好瞎i
5楼-- · 2019-02-21 00:41

Use these commands in your prompt.

npm cache clear --force
rm -rf node_modules/
npm install -d
查看更多
Viruses.
6楼-- · 2019-02-21 00:42

Try npm run ionic:serve. Similar issue occurred when installing the latest cordova update.

查看更多
劫难
7楼-- · 2019-02-21 00:49

Install ws:

npm install ws@3.3.2 --save-dev --save-exact
查看更多
登录 后发表回答