# Please Help! Can't run any ionic program because of npm error

**URL:** <https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455>\
**Category:** ionic-v3\
**Created:** [October 10, 2016, 3:31pm UTC](https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455 "2016-10-10T15:31:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![JRC2307](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@JRC2307](https://forum.ionicframework.com/u/JRC2307)\
**Post date:** [October 10, 2016, 3:31pm UTC](https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455/1 "2016-10-10T15:31:32Z")

</div>

A team and I are build an app ass a school project and everything was going fine until we migrated to the 2.1.0 version. Everything is up to date. I believe this problem might be related to the Mac OS Sierra upgrade but I can’t seem to find anybody else with this problem or a solution. I’m quite desperate because I can’t program without testing.

J@Javiers-MacBook-Air  ~/Desktop/ITESM\_ISC/Semestre7/LDAW : AMSS/Progra  node -v  
v6.7.0

J@Javiers-MacBook-Air  ~/Desktop/ITESM\_ISC/Semestre7/LDAW : AMSS/Progra  npm -v  
3.10.7

I’ve deleted, reinstalled and updated all of these: Node, Npm, ionic.

Inside the project I delete node\_modules and run “npm install”, its successful but I get a few of these warnings;

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/9/a/9a55c70dde78db2d894fa988bc204a4b8c192db0.png)

and when I run ionic serve:

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/5/b/5b056e4f268a260bcff18243227ebeeb93e1591a.png)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![ChrisGriiffith](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chrisgriiffith/32/66576_2.png) [@ChrisGriiffith](https://forum.ionicframework.com/u/ChrisGriiffith)\
**Post date:** [October 10, 2016, 3:59pm UTC](https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455/2 "2016-10-10T15:59:04Z")

</div>

Have you tried uninstalling Node and installing v4.6.0 instead?

Chris

---

<div class="post-metadata">

**Author:** ![JRC2307](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@JRC2307](https://forum.ionicframework.com/u/JRC2307)\
**Post date:** [October 10, 2016, 4:22pm UTC](https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455/3 "2016-10-10T16:22:01Z")

</div>

I just tried that, but It’s still not working

This is the npm-debug.log

0 info it worked if it ends with ok  
1 verbose cli [‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘run’, ‘watch’]  
2 info using npm@2.15.9  
3 info using node@v4.6.0  
4 verbose run-script [‘prewatch’, ‘watch’, ‘postwatch’]  
5 info prewatch ionic-hello-world@  
6 info watch ionic-hello-world@  
7 verbose unsafe-perm in lifecycle true  
8 info ionic-hello-world@ Failed to exec watch script  
9 verbose stack Error: ionic-hello-world@ watch: `ionic-app-scripts watch`  
9 verbose stack spawn ENOENT  
9 verbose stack at ChildProcess. (/usr/local/lib/node\_modules/npm/lib/utils/spawn.js:17:16)  
9 verbose stack at emitTwo (events.js:87:13)  
9 verbose stack at ChildProcess.emit (events.js:172:7)  
9 verbose stack at maybeClose (internal/child\_process.js:829:16)  
9 verbose stack at Process.ChildProcess.\_handle.onexit (internal/child\_process.js:211:5)  
10 verbose pkgid ionic-hello-world@  
11 verbose cwd /Users/J/Desktop/ITESM\_ISC/Semestre7/LDAW : AMSS/Progra/Proyect/test  
12 error Darwin 16.0.0  
13 error argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” "watch"  
14 error node v4.6.0  
15 error npm v2.15.9  
16 error file sh  
17 error code ELIFECYCLE  
18 error errno ENOENT  
19 error syscall spawn  
20 error ionic-hello-world@ watch: `ionic-app-scripts watch`  
20 error spawn ENOENT  
21 error Failed at the ionic-hello-world@ watch script ‘ionic-app-scripts watch’.  
21 error This is most likely a problem with the ionic-hello-world package,  
21 error not with npm itself.  
21 error Tell the author that this fails on your system:  
21 error ionic-app-scripts watch  
21 error You can get information on how to open an issue for this project with:  
21 error npm bugs ionic-hello-world  
21 error Or if that isn’t available, you can get their info via:  
21 error  
21 error npm owner ls ionic-hello-world  
21 error There is likely additional logging output above.  
22 verbose exit [1, true]

---

<div class="post-metadata">

**Author:** ![ChrisGriiffith](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chrisgriiffith/32/66576_2.png) [@ChrisGriiffith](https://forum.ionicframework.com/u/ChrisGriiffith)\
**Post date:** [October 10, 2016, 4:38pm UTC](https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455/4 "2016-10-10T16:38:54Z")

</div>

Hum, have you updated the ionic app scripts?

---

<div class="post-metadata">

**Author:** ![JRC2307](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@JRC2307](https://forum.ionicframework.com/u/JRC2307)\
**Post date:** [October 10, 2016, 5:25pm UTC](https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455/5 "2016-10-10T17:25:26Z")

</div>

I ran  
`npm install -g npm-check-updates`

And then  
`npm update`

after that  
`ncu -a/--upgradeAll`

and got

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/a/8/a895c2606492671aed6abe01867138978ca296a6.png)

I’m not sure if you were referring to that.

---

<div class="post-metadata">

**Author:** ![JRC2307](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@JRC2307](https://forum.ionicframework.com/u/JRC2307)\
**Post date:** [October 10, 2016, 6:26pm UTC](https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455/6 "2016-10-10T18:26:35Z")

</div>

Managed to solve it by making a global install 0.0.29 version of app-scripts. Works now, but shouldn’t this be done when you install ionic?

---

<div class="post-metadata">

**Author:** ![Ellezo](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ellezo/32/104261_2.png) [@Ellezo](https://forum.ionicframework.com/u/Ellezo)\
**Post date:** [October 10, 2016, 6:52pm UTC](https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455/7 "2016-10-10T18:52:59Z")

</div>

I think app-script version 0.0.29 can only be installed using latest node. I encountered this problem and I used node 6.7.0 before creating a project to avoid this error in future projects.

---

<div class="post-metadata">

**Author:** ![mehradrafigh](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@mehradrafigh](https://forum.ionicframework.com/u/mehradrafigh)\
**Post date:** [February 24, 2017, 3:12pm UTC](https://forum.ionicframework.com/t/please-help-cant-run-any-ionic-program-because-of-npm-error/66455/8 "2017-02-24T15:12:53Z")

</div>

I am having the same issue here

Trying to build a production app on a Mac Mini. The Build fails on that machine, but works on my Macboko Pro…  
I already tried installing app-scripts as a global module, but that didn’t work either…

No matter which ionic command I try to execute, I always get the same error…

This is the output of `ionic info`

```auto
Your system information:

Cordova CLI: 6.5.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.6.0
Xcode version: Xcode 8.2.1 Build version 8C1002

```

This is the npm log

```auto
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/7.6.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'ionic:serve',
1 verbose cli '--',
1 verbose cli '--v2',
1 verbose cli '--address',
1 verbose cli '0.0.0.0',
1 verbose cli '--port',
1 verbose cli '8100',
1 verbose cli '--livereload-port',
1 verbose cli '35729' ]
2 info using npm@4.4.0
3 info using node@v7.6.0
4 verbose run-script ['preionic:serve', 'ionic:serve', 'postionic:serve']
5 info lifecycle ionic-hello-world@~preionic:serve: ionic-hello-world@
6 silly lifecycle ionic-hello-world@~preionic:serve: no script for preionic:serve, continuing
7 info lifecycle ionic-hello-world@~ionic:serve: ionic-hello-world@
8 verbose lifecycle ionic-hello-world@~ionic:serve: unsafe-perm in lifecycle true
9 verbose lifecycle ionic-hello-world@~ionic:serve: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/iosdeploy/garcon-mobile-apps/bestellbar-release-2017-02-24-15:50:20/bestellbar-hybrid/current-version/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle ionic-hello-world@~ionic:serve: CWD: /Users/iosdeploy/garcon-mobile-apps/bestellbar-release-2017-02-24-15:50:20/bestellbar-hybrid/current-version
11 silly lifecycle ionic-hello-world@~ionic:serve: Args: [ '-c',
11 silly lifecycle 'ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"' ]
12 info lifecycle ionic-hello-world@~ionic:serve: Failed to exec ionic:serve script
13 verbose stack Error: ionic-hello-world@ ionic:serve: `ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"`
13 verbose stack spawn ENOENT
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:33:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:192:7)
13 verbose stack at maybeClose (internal/child_process.js:890:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid ionic-hello-world@
15 verbose cwd /Users/iosdeploy/garcon-mobile-apps/bestellbar-release-2017-02-24-15:50:20/bestellbar-hybrid/current-version
16 verbose Darwin 16.4.0
17 verbose argv "/usr/local/Cellar/node/7.6.0/bin/node" "/usr/local/bin/npm" "run" "ionic:serve" "--" "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
18 verbose node v7.6.0
19 verbose npm v4.4.0
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error ionic-hello-world@ ionic:serve: `ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"`
24 error spawn ENOENT
25 error Failed at the ionic-hello-world@ ionic:serve script 'ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the ionic-hello-world package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
25 error You can get information on how to open an issue for this project with:
25 error npm bugs ionic-hello-world
25 error Or if that isn't available, you can get their info via:
25 error npm owner ls ionic-hello-world
25 error There is likely additional logging output above.
26 verbose exit [1, true]
...skipping...
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/7.6.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'ionic:serve',
1 verbose cli '--',
1 verbose cli '--v2',
1 verbose cli '--address',
1 verbose cli '0.0.0.0',
1 verbose cli '--port',
1 verbose cli '8100',
1 verbose cli '--livereload-port',
1 verbose cli '35729' ]
2 info using npm@4.4.0
3 info using node@v7.6.0
4 verbose run-script ['preionic:serve', 'ionic:serve', 'postionic:serve']
5 info lifecycle ionic-hello-world@~preionic:serve: ionic-hello-world@
6 silly lifecycle ionic-hello-world@~preionic:serve: no script for preionic:serve, continuing
7 info lifecycle ionic-hello-world@~ionic:serve: ionic-hello-world@
8 verbose lifecycle ionic-hello-world@~ionic:serve: unsafe-perm in lifecycle true
9 verbose lifecycle ionic-hello-world@~ionic:serve: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/iosdeploy/garcon-mobile-apps/bestellbar-release-2017-02-24-15:50:20/bestellbar-hybrid/current-version/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle ionic-hello-world@~ionic:serve: CWD: /Users/iosdeploy/garcon-mobile-apps/bestellbar-release-2017-02-24-15:50:20/bestellbar-hybrid/current-version
11 silly lifecycle ionic-hello-world@~ionic:serve: Args: [ '-c',
11 silly lifecycle 'ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"' ]
12 info lifecycle ionic-hello-world@~ionic:serve: Failed to exec ionic:serve script
13 verbose stack Error: ionic-hello-world@ ionic:serve: `ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"`
13 verbose stack spawn ENOENT
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:33:16)
13 verbose stack at emitTwo (events.js:106:13)
13 verbose stack at ChildProcess.emit (events.js:192:7)
13 verbose stack at maybeClose (internal/child_process.js:890:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
14 verbose pkgid ionic-hello-world@
15 verbose cwd /Users/iosdeploy/garcon-mobile-apps/bestellbar-release-2017-02-24-15:50:20/bestellbar-hybrid/current-version
16 verbose Darwin 16.4.0
17 verbose argv "/usr/local/Cellar/node/7.6.0/bin/node" "/usr/local/bin/npm" "run" "ionic:serve" "--" "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
18 verbose node v7.6.0
19 verbose npm v4.4.0
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error ionic-hello-world@ ionic:serve: `ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"`
24 error spawn ENOENT
25 error Failed at the ionic-hello-world@ ionic:serve script 'ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"'.
25 error Make sure you have the latest version of node.js and npm installed.
25 error If you do, this is most likely a problem with the ionic-hello-world package,
25 error not with npm itself.
25 error Tell the author that this fails on your system:
25 error ionic-app-scripts serve "--v2" "--address" "0.0.0.0" "--port" "8100" "--livereload-port" "35729"
25 error You can get information on how to open an issue for this project with:
25 error npm bugs ionic-hello-world
25 error Or if that isn't available, you can get their info via:
25 error npm owner ls ionic-hello-world
25 error There is likely additional logging output above.
26 verbose exit [1, true]

```

Does anybody has a clue how one is supposed to fix this?
