Ionic-app-scripts: watch failed: A watch configured to watch the following paths failed to start - 1.0.0

Created on 12 Jan 2017  ·  7Comments  ·  Source: ionic-team/ionic-app-scripts

Short description of the problem:

I just upgraded to RC5 and ionic-app-scripts 1.0.0. When I run ionic serve I get the following error

watch failed: A watch configured to watch the following paths failed to start. It likely that a file
 referenced does not exist: 
C:\ionic\MoneyLeash2\src\assets\**\*
C:\ionic\MoneyLeash2\src\index.html,
C:\ionic\MoneyLeash2\src\manifest.json, 
C:\ionic\MoneyLeash2\src\service-worker.js,
C:\ionic\MoneyLeash2\node_modules\ionicons\dist\fonts\**\*,
C:\ionic\MoneyLeash2\node_modules\ionic-angular\fonts\**\*,
C:\ionic\MoneyLeash2\node_modules\ionic-angular\polyfills\polyfills.js,
C:\ionic\MoneyLeash2\node_modules\sw-toolbox\sw-toolbox.js,
C:\ionic\MoneyLeash2\node_modules\font-awesome\fonts\**\*,            
C:\ionic\MoneyLeash2\node_modules\font-awesome\css\font-awesome.min.css

Below is my package.json file

{
  "name": "moneyleash",
  "description": "Don't let your money run wild. Keep it on a leash!",
  "license": "Apache-2.0",
  "repository": {
    "type": "git",
    "url": "https://github.com/gigocabrera/MoneyLeash2"
  },
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic/storage": "1.1.7",
    "@types/jasmine": "^2.5.36",
    "angularfire2": "2.0.0-beta.6",
    "firebase": "3.3.0",
    "font-awesome": "4.7.0",
    "ionic-angular": "2.0.0-rc.5",
    "ionic-native": "2.2.11",
    "ionicons": "3.0.0",
    "moment": "2.17.1",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.0.0",
    "typescript": "^2.0.9"
  },
  "cordovaPlugins": [
    "cordova-plugin-device",
    "cordova-plugin-console",
    "cordova-plugin-whitelist",
    "cordova-plugin-splashscreen",
    "cordova-plugin-statusbar",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "config": {
    "ionic_copy": "./scripts/copy-custom-libs.js"
  }
}

I noticed that the file missing is the sw-toolbox.js. As a matter of fact, the whole folder for sw is missing

What behavior are you expecting?

I expect ionic serve to work without any errors

Which @ionic/app-scripts version are you using?
1.0.0

Most helpful comment

I have sw-toolbox as well. But still facing the same issue.

All 7 comments

Silly me, I forgot to add “sw-toolbox”: “3.4.0” to package.json :stuck_out_tongue_winking_eye: (duh)

I have sw-toolbox as well. But still facing the same issue.

@gigocabrera how to add “sw-toolbox”: “3.4.0” to package.json?

Manually we cant do right ?

through cli?

@Abhiramkadiri I have just added it to "dependencies": { ..... } and then run npm install. I am not sure if this is the right place since I'm new to this npm stuff, but it works for me 😄

@MA-Maddin

Its not working for me @MA-Maddin

Try to put a service-worker.js file (which is automatically generated when you create a new Ionic project from the cli) in the 'src/' folder of your project. It worked for me ^^

try npm update

Was this page helpful?
0 / 5 - 0 ratings