Error like shown below when running 'ionic serve' command in cmd prompt


#1

The below error is arising in windows 8 cmd prompt when I run the command - ionic serve. Anyone Please help me out of this.
events.js:182
throw er; // Unhandled ‘error’ event
^

Error: spawn C:\Program Files\nodejs\node.exe ENOENT
at notFoundError (C:\Users\UserName\Desktop\Ionic\App\Trading\node_modules\cross-
spawn\lib\enoent.js:11:11)
at verifyENOENT (C:\Users\UserName\Desktop\Ionic\App\Trading\node_modules\cross-s
pawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (C:\Users\UserName\Desktop\Ionic\App\Trading\node_modules
\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)


#2

I hv the same error after updating to the latest CLI.


#3

I created an issue for this error: https://github.com/ionic-team/ionic-cli/issues/2574


#4

Can you please rerun the command with --verbose at the end and post the complete output you get? Thanks.


#5

I have the same proble … I just copied my config.xml and package,json file from my backup before updating to the latest cli and replace … That’s what save me… and since then am not updating till they fix it … at least till am done with the project am working on.


#6

Imacs-AMIT:helloworld AMIT$ ionic serve -b
[WARN] Detected @ionic/cli-plugin-cordova in your package.json.

   As of CLI 3.8, it is no longer needed. You can uninstall it:
   
   npm uninstall -D @ionic/cli-plugin-cordova

[WARN] Detected @ionic/cli-plugin-ionic-angular in your package.json.

   As of CLI 3.8, it is no longer needed. You can uninstall it:
   
   npm uninstall -D @ionic/cli-plugin-ionic-angular

Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port
53703 --nobrowser - Ctrl+C to cancel
[13:39:44] watch started …
[13:39:44] build dev started …
[13:39:44] clean started …
[13:39:44] clean finished in 2 ms
[13:39:44] copy started …
[13:39:44] deeplinks started …
[13:39:44] deeplinks finished in 23 ms
[13:39:44] transpile started …
[13:39:50] transpile finished in 5.51 s
[13:39:50] preprocess started …
[13:39:50] preprocess finished in less than 1 ms
[13:39:50] webpack started …
[13:39:50] copy finished in 6.11 s
[13:39:56] webpack finished in 6.02 s
[13:39:56] sass started …
[13:39:58] sass finished in 1.86 s
[13:39:58] postprocess started …
[13:39:58] postprocess finished in 40 ms
[13:39:58] lint started …
[13:39:58] build dev finished in 13.80 s
[13:39:58] watch ready in 14.22 s
[13:39:58] dev server running: http://localhost:8101/

[OK] Development server running!
Local: http://localhost:8101
External: http://192.168.6.181:8101, http://192.168.2.1:8101
DevApp: helloworld@8101 on Imacs-AMIT.local

[13:40:07] lint finished in 9.03 s
^Z
[2]+ Stopped ionic serve -b
Imacs-AMIT:helloworld AMIT$ ionic serve --verbose
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: ‘/Users/imac/Desktop/codedamn/tutorials/helloworld’, local: true, binPath:
’/usr/local/lib/node_modules/ionic/bin/ionic’, libPath:
’/Users/imac/Desktop/codedamn/tutorials/helloworld/node_modules/ionic/dist/index.js’ }
[WARN] Detected @ionic/cli-plugin-cordova in your package.json.

   As of CLI 3.8, it is no longer needed. You can uninstall it:
   
   npm uninstall -D @ionic/cli-plugin-cordova

[WARN] Detected @ionic/cli-plugin-ionic-angular in your package.json.

   As of CLI 3.8, it is no longer needed. You can uninstall it:
   
   npm uninstall -D @ionic/cli-plugin-ionic-angular

Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port
53703 --nobrowser - Ctrl+C to cancel
[13:44:19] watch started …
[13:44:19] build dev started …
[13:44:19] clean started …
[13:44:19] clean finished in 1 ms
[13:44:19] copy started …
[13:44:19] deeplinks started …
[13:44:19] deeplinks finished in 22 ms
[13:44:19] transpile started …
[13:44:25] transpile finished in 5.19 s
[13:44:25] preprocess started …
[13:44:25] preprocess finished in less than 1 ms
[13:44:25] webpack started …
[13:44:25] copy finished in 5.79 s
[13:44:31] webpack finished in 5.90 s
[13:44:31] sass started …
[13:44:33] sass finished in 1.96 s
[13:44:33] postprocess started …
[13:44:33] postprocess finished in 79 ms
[13:44:33] lint started …
[13:44:33] build dev finished in 13.54 s
[13:44:33] watch ready in 13.87 s
[13:44:33] dev server running: http://localhost:8102/

[OK] Development server running!
Local: http://localhost:8102
External: http://192.168.6.181:8102, http://192.168.2.1:8102
DevApp: helloworld@8102 on Imacs-AMIT.local

[13:44:45] lint finished in 12.80 s
[13:44:56] copy update started …
[13:44:56] copy update finished in 11 ms

events.js:182
throw er; // Unhandled ‘error’ event
^

Error: read ECONNRESET
at exports._errnoException (util.js:1022:11)
at TCP.onread (net.js:610:25)