ionic-cli: sh: 1: ionic-app-scripts: not found
Short description of the problem:
Cannot build a blank app.
Steps to reproduce:
ionic start prueba blank --v2
cd prueba
ionic serve
ionic serve
output:
Running 'serve:before' npm script before serve
> ionic-hello-world@ watch /home/raquinta/workspace/prueba
> ionic-app-scripts watch
sh: 1: ionic-app-scripts: not found
npm ERR! Linux 3.16.0-38-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "watch"
npm ERR! node v4.6.0
npm ERR! npm v3.10.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! ionic-hello-world@ watch: `ionic-app-scripts watch`
npm ERR! spawn ENOENT
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/raquinta/workspace/prueba/npm-debug.log
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'watch' ]
2 info using npm@3.10.8
3 info using node@v4.6.0
4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
5 info lifecycle ionic-hello-world@~prewatch: ionic-hello-world@
6 silly lifecycle ionic-hello-world@~prewatch: no script for prewatch, continuing
7 info lifecycle ionic-hello-world@~watch: ionic-hello-world@
8 verbose lifecycle ionic-hello-world@~watch: unsafe-perm in lifecycle true
9 verbose lifecycle ionic-hello-world@~watch: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/home/raquinta/workspace/prueba/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/android-sdk-linux/tools:/usr/local/android-sdk-linux/platform-tools
10 verbose lifecycle ionic-hello-world@~watch: CWD: /home/raquinta/workspace/prueba
11 silly lifecycle ionic-hello-world@~watch: Args: [ '-c', 'ionic-app-scripts watch' ]
12 info lifecycle ionic-hello-world@~watch: Failed to exec watch script
13 verbose stack Error: ionic-hello-world@ watch: `ionic-app-scripts watch`
13 verbose stack spawn ENOENT
13 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:33:16)
13 verbose stack at emitTwo (events.js:87:13)
13 verbose stack at ChildProcess.emit (events.js:172:7)
13 verbose stack at maybeClose (internal/child_process.js:829:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid ionic-hello-world@
15 verbose cwd /home/raquinta/workspace/prueba
16 error Linux 3.16.0-38-generic
17 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "watch"
18 error node v4.6.0
19 error npm v3.10.8
20 error file sh
21 error code ELIFECYCLE
22 error errno ENOENT
23 error syscall spawn
24 error ionic-hello-world@ watch: `ionic-app-scripts watch`
24 error spawn ENOENT
25 error Failed at the ionic-hello-world@ watch script 'ionic-app-scripts watch'.
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 watch
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 ]
ionic info
:
Your system information:
Cordova CLI: 6.3.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID: LinuxMint Description: Linux Mint 17.2 Rafaela
Node Version: v4.6.0
npm -v
: 3.10.8
Comments: I’ve been reading similar problem posts and it says may be it’s a node version problem. But I think v4.6.0 is supported because it’s a LTS version, rigth? Thanks in advance.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (1 by maintainers)
looks like this is an issue with npm install… try this: delete node_modules > run npm install --dev > run npm install this fixed it for me…
The problem is that ‘ionic start’ doesn’t install devDependencies (@ionic/app-scripts": “^0.0.36”) .
I have installed:
Use ‘npm install’ to resolve the problem.
That’s work fine.
Regards,
it’s solved…( npm install @ionic/app-scripts@latest --save-dev )
Wow that fixed my problem exactly. thanks @exxmen ! : D
@exxmen
This also fixed it for me at ionic version 3.0.0
@exxmen Thanks man … your solution worked with me
Am having the same issue. Just installed
cordova
andionic
on my MBP and ranionic serve
in a hello world package and I get the same error. The same codebase wokrs on another machine.I had the same problem, solve deleting node_modules and npm install.