ionic-cli: Ionic serve stops working out of nowhere
I have an RC0 app that was working fine last night. “ionic serve” worked fine. Now all of a sudden this morning I type “ionic serve” and it will not work. Logs:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/6.2.0/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'watch' ]
2 info using npm@3.10.8
3 info using node@v6.2.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/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/al/Dropbox/Development/chopchop/ionic-app/ChopChop/node_modules/.bin:/usr/local/Cellar/node/6.2.0/bin:/usr/local/share/npm/bin:/Users/al/.rbenv/shims:/Users/al/.rbenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
10 verbose lifecycle ionic-hello-world@~watch: CWD: /Users/al/Dropbox/Development/chopchop/ionic-app/ChopChop
11 silly lifecycle ionic-hello-world@~watch: Args: [ '-c', 'ionic-app-scripts watch' ]
12 silly lifecycle ionic-hello-world@~watch: Returned: code: 1 signal: null
13 info lifecycle ionic-hello-world@~watch: Failed to exec watch script
14 verbose stack Error: ionic-hello-world@ watch: `ionic-app-scripts watch`
14 verbose stack Exit status 1
14 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid ionic-hello-world@
16 verbose cwd /Users/al/Dropbox/Development/chopchop/ionic-app/ChopChop
17 error Darwin 15.6.0
18 error argv "/usr/local/Cellar/node/6.2.0/bin/node" "/usr/local/bin/npm" "run" "watch"
19 error node v6.2.0
20 error npm v3.10.8
21 error code ELIFECYCLE
22 error ionic-hello-world@ watch: `ionic-app-scripts watch`
22 error Exit status 1
23 error Failed at the ionic-hello-world@ watch script 'ionic-app-scripts watch'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the ionic-hello-world package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error ionic-app-scripts watch
23 error You can get information on how to open an issue for this project with:
23 error npm bugs ionic-hello-world
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls ionic-hello-world
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (2 by maintainers)
I have (so far so good) found a workaround, by deleting the node_modules and running ‘npm install’ in the project directory.
Trying to create a project I got this error.
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.0/linux-x64-57_binding.node Cannot download “https://github.com/sass/node-sass/releases/download/v4.5.0/linux-x64-57_binding.node”:
e --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ ‘/usr/bin/nodejs’, gyp verb cli ‘/home/hommydejesus/DenunciasApp/node_modules/node-gyp/bin/node-gyp.js’, gyp verb cli ‘rebuild’, gyp verb cli ‘–verbose’, gyp verb cli ‘–libsass_ext=’, gyp verb cli ‘–libsass_cflags=’, gyp verb cli ‘–libsass_ldflags=’, gyp verb cli ‘–libsass_library=’ ] gyp info using node-gyp@3.6.2 gyp info using node@8.0.0 | linux | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing “build” directory gyp verb command configure [] gyp verb check python checking for Python executable “python2” in the PATH gyp verb
which
succeeded python2 /usr/bin/python2 gyp verb check python version/usr/bin/python2 -c "import platform; print(platform.python_version());"
returne d: “2.7.6\n” gyp verb get node dir no --target version specified, falling back to host node version: 8.0.0 gyp verb command install [ ‘8.0.0’ ] gyp verb install input version string “8.0.0” gyp verb install installing version: 8.0.0 gyp verb install --ensure was passed, so won’t reinstall if already installed gyp verb install version is already installed, need to check “installVersion” gyp verb got “installVersion” 9 gyp verb needs “installVersion” 9 gyp verb install version is good gyp verb get node dir target node version installed: 8.0.0 gyp verb build dir attempting to create “build” dir: /home/hommydejesus/DenunciasApp/node_modules/node-sass/buil d gyp verb build dir “build” dir needed to be created? /home/hommydejesus/DenunciasApp/node_modules/node-sass/buil d gyp verb build/config.gypi creating config file gyp verb build/config.gypi writing out config file: /home/hommydejesus/DenunciasApp/node_modules/node-sass/build /config.gypi gyp verb config.gypi checking for gypi file: /home/hommydejesus/DenunciasApp/node_modules/node-sass/config.gypi gyp verb common.gypi checking for gypi file: /home/hommydejesus/DenunciasApp/node_modules/node-sass/common.gypi gyp verb gyp gyp format was not specified; forcing “make” gyp info spawn /usr/bin/python2 gyp info spawn args [ ‘/home/hommydejesus/DenunciasApp/node_modules/node- gyp/gyp/gyp_main.py’, gyp info spawn args ‘binding.gyp’, gyp info spawn args ‘-f’, gyp info spawn args ‘make’, gyp info spawn args ‘-I’, gyp info spawn args ‘/home/hommydejesus/DenunciasApp/node_modules/node-sass/build/config.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘/home/hommydejesus/DenunciasApp/node_modules/node-gyp/addon.gypi’, gyp info spawn args ‘-I’, gyp info spawn args ‘/home/hommydejesus/.node-gyp/8.0.0/include/node/common.gypi’, gyp info spawn args ‘-Dlibrary=shared_library’, gyp info spawn args ‘-Dvisibility=default’, gyp info spawn args ‘-Dnode_root_dir=/home/hommydejesus/.node-gyp/8.0.0’, gyp info spawn args ‘-Dnode_gyp_dir=/home/hommydejesus/DenunciasApp/node_modules/node-gyp’, gyp info spawn args ‘-Dnode_lib_file=/home/hommydejesus/.node-gyp/8.0.0/<(target_arch)/node.lib’, gyp info spawn args ‘-Dmodule_root_dir=/home/hommydejesus/DenunciasApp/node_modules/node-sass’, gyp info spawn args ‘-Dnode_engine=v8’, gyp info spawn args ‘–depth=.’, gyp info spawn args ‘–no-parallel’, gyp info spawn args ‘–generator-output’, gyp info spawn args ‘build’, gyp info spawn args ‘-Goutput_dir=.’ ] gyp verb command build [] gyp verb build type Release gyp verb architecture x64 gyp verb node dev dir /home/hommydejesus/.node-gyp/8.0.0 gyp verbwhich
succeeded formake
/usr/bin/make gyp info spawn make gyp info spawn args [ ‘V=1’, ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ] make: Entering directory/home/hommydejesus/DenunciasApp/node_modules/node-sass/build' g++ '-DNODE_GYP_MODULE_NAME=libsass' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DLIBSASS_VERSION="3.5.0.beta.2"' -I/home/hommydejesus/.node-gyp/8.0.0/ include/node -I/home/hommydejesus/.node-gyp/8.0.0/src -I/home/hommydejesus/.node-gyp/8.0.0/deps/uv/include -I/home/hommy dejesus/.node-gyp/8.0.0/deps/v8/include -I../src/libsass/include -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -m6 4 -O3 -fno-omit-frame-pointer -std=gnu++0x -std=c++0x -fexceptions -frtti -MMD -MF ./Release/.deps/Release/obj.target/li bsass/src/libsass/src/ast.o.d.raw -c -o Release/obj.target/libsass/src/libsass/src/ast.o ../src/libsass/src/ast.cpp make: g++: Command not found make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] Error 127 make: Leaving directory
/home/hommydejesus/DenunciasApp/node_modules/node-sass/build’ gyp ERR! build error gyp ERR! stack Error:make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/hommydejesus/DenunciasApp/node_modules/node-gyp/lib/build.js:25 8:23) gyp ERR! stack at emitTwo (events.js:125:13) gyp ERR! stack at ChildProcess.emit (events.js:213:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12) gyp ERR! System Linux 4.4.0-78-generic gyp ERR! command “/usr/bin/nodejs” “/home/hommydejesus/DenunciasApp/node_modules/node-gyp/bin/node-gyp.js” “rebu ild” “–verbose” “–libsass_ext=” “–libsass_cflags=” “–libsass_ldflags=” “–libsass_library=” gyp ERR! cwd /home/hommydejesus/DenunciasApp/node_modules/node-sass gyp ERR! node -v v8.0.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok Build failed with error code: 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.5.0 postinstall:node scripts/build.js
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.5.0 postinstall script. npm ERR! Failed at the node-sass@4.5.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.