RC4 - Error on serve

I just upgraded from RC1 to RC4. I’m getting an error when I build:

[14:48:22]  ionic-app-scripts 0.0.47
[14:48:23]  watch started ...
[14:48:23]  build dev started ...
[14:48:23]  clean started ...
[14:48:23]  clean finished in 27 ms
[14:48:23]  copy started ...
[14:48:23]  transpile started ...
[14:48:40]  transpile finished in 17.07 s
[14:48:40]  webpack started ...
[14:48:41]  copy finished in 17.91 s
[14:49:26]  webpack finished in 46.55 s
[14:49:26]  sass started ...
[14:49:32]  sass finished in 5.95 s
[14:49:32]  build dev finished in 69.68 s
[14:49:35]  watch failed: A watch configured to watch the following paths failed to start. It likely that a file
            referenced does not exist: c:\Users\Cindy\Documents\Ionic2\forecast4\src\assets\**\*,
            c:\Users\Cindy\Documents\Ionic2\forecast4\src\index.html,
            c:\Users\Cindy\Documents\Ionic2\forecast4\src\manifest.json,
            c:\Users\Cindy\Documents\Ionic2\forecast4\src\service-worker.js,
            c:\Users\Cindy\Documents\Ionic2\forecast4\node_modules\ionicons\dist\fonts\**\*,
            c:\Users\Cindy\Documents\Ionic2\forecast4\node_modules\ionic-angular\fonts\**\*,
            c:\Users\Cindy\Documents\Ionic2\forecast4\node_modules\ionic-angular\polyfills\polyfills.js
[14:49:35]  dev server running: http://localhost:8100/

I have checked that those listed files do exist, so I’m not sure what is going on or how to fix it. The app continues to load as expected despite the error.

1 Like

place manifest.json file and serviceworker.js outside assets folder it will work fine…

1 Like

Thank you! It works great now.

The Best Solution to this problem is adding “sw-toolbox”: “3.4.0” in pakage.json as mentioned below:

{

“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”
},
“dependencies”: {

“sw-toolbox”: “3.4.0”
},
“devDependencies”: {

},
“description”: “”,
“cordovaPlugins”: [],
“cordovaPlatforms”: []
}