Ionic-app-scripts: ionic serve fails on newly created project

Created on 23 Oct 2016  路  6Comments  路  Source: ionic-team/ionic-app-scripts

Short description of the problem:

ionic serve does not work

What behavior are you expecting?

Steps to reproduce:
1.ionic start teste --v2
2.cd teste
3.ionic serve

Output:

[11:40:34]  ionic-app-scripts 0.0.36 
[11:40:34]  watch started ... 
[11:40:34]  build dev started ... 
[11:40:34]  clean started ... 
[11:40:34]  clean finished in less than 1 ms 
[11:40:34]  copy started ... 
[11:40:34]  transpile started ... 
[11:40:34]  lint started ... 
[11:40:35]  lint finished in 1.05 s 
[11:40:36]  transpile finished in 2.44 s 
[11:40:36]  bundle started ... 
[11:40:36]  copy finished in 2.49 s 
[11:40:44]  bundle finished in 7.59 s 
[11:40:44]  sass started ... 
[11:40:45]  sass finished in 1.40 s 
[11:40:45]  build dev finished in 11.44 s 
[11:40:45]  watch failed: watcher error: /home/luis/ionic/teste/home/luis/ionic/teste/src/**/*.ts: Error: 
            watch /home/luis/ionic/teste/src/app/app.component.ts ENOSPC 
[11:40:45]  ionic-app-script task: "watch" 
[11:40:45]  Error: watcher error: /home/luis/ionic/teste/home/luis/ionic/teste/src/**/*.ts: Error: watch 
            /home/luis/ionic/teste/src/app/app.component.ts ENOSPC 

npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "watch" "--color"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! ionic-hello-world@ watch: `ionic-app-scripts watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the ionic-hello-world@ watch script 'ionic-app-scripts watch'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ionic-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     ionic-app-scripts watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs ionic-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls ionic-hello-world
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/luis/ionic/teste/npm-debug.log
Caught exception:
 undefined 

Which @ionic/app-scripts version are you using?
Cordova CLI: 6.3.1
Ionic Framework Version: 2.0.0-rc.1
Ionic CLI Version: 2.1.1
Ionic App Lib Version: 2.1.1
Ionic App Scripts Version: 0.0.36
OS: Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS
Node Version: v6.9.1

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)

needs_reply

Most helpful comment

@anagram3k This doesn't work for me :/

Any workaround?

All 6 comments

downgraded to [email protected], now it works

Hello,

I had the same problem.

I deleted node_modules and run "npm install", now it's working.

@anagram3k can you try updating to 0.0.36, deleting your node_modules and running npm install again? Thanks!

use package.json from https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#packagejson-updates

npm install @ionic/app-scripts@latest --save-dev
rm -rf node_modules
npm install

Everything works now.

@anagram3k This doesn't work for me :/

Any workaround?

the problem is the number of watches .
I resolve with this command : echo fs.inotify.max_user_watches=582222 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bastibense picture bastibense  路  3Comments

isflo96 picture isflo96  路  3Comments

hermitdemschoenenleben picture hermitdemschoenenleben  路  3Comments

MarkErik picture MarkErik  路  3Comments

danbucholtz picture danbucholtz  路  4Comments