help icon indicating copy to clipboard operation
help copied to clipboard

Spawn "node.exe" ENOENT

Open ghost opened this issue 8 years ago • 10 comments

Hello,

I follow tutorial here and got some error when I run ionic serve -l --verbose

[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND [DEBUG] CLI flags: { interactive: true, confirm: false } [DEBUG] { cwd: 'F:\Folder\projDir', local: false, binPath: 'C:\Users\username\AppData\Roaming\npm\node_modules\ionic\bin\ionic', libPath: 'C:\Users\username\AppData\Roaming\npm\node_modules\ionic\dist\index.js' } [DEBUG] Detected HTTPS_PROXY in environment [DEBUG] Loading global plugin @ionic/cli-plugin-proxy [DEBUG] Latest plugin version of @ionic/cli-plugin-proxy is unknown, according to daemon file. [DEBUG] New daemon pid: 14724 Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser --lab - Ctrl+C to cancel [15:35:47] watch started ... [15:35:47] build dev started ... [15:35:47] clean started ... [15:35:47] clean finished in 5 ms [15:35:47] copy started ... [15:35:47] deeplinks started ... [15:35:47] deeplinks finished in 17 ms [15:35:47] transpile started ... [15:35:50] transpile finished in 2.82 s [15:35:50] preprocess started ... [15:35:50] preprocess finished in 1 ms [15:35:50] webpack started ... [15:35:50] copy finished in 3.06 s [15:35:56] webpack finished in 6.55 s [15:35:56] sass started ... Without from option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to undefined to prevent this warning. [15:35:57] sass finished in 872 ms [15:35:57] postprocess started ... [15:35:57] postprocess finished in 6 ms [15:35:57] lint started ... [15:35:57] build dev finished in 10.48 s [15:35:57] watch ready in 10.56 s [15:35:57] dev server running: http://localhost:8100/

[OK] Development server running! Local: http://localhost:8100 External: http://10.223.10.90:8100, http://192.168.136.1:8100, http://192.168.163.1:8100 DevApp: proj@8100 on PCNAME

[15:36:00] lint finished in 2.67 s events.js:183 throw er; // Unhandled 'error' event ^

Error: spawn "C:\Program Files\nodejs\node.exe" ENOENT at notFoundError (C:\Users\username\AppData\Roaming\npm\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:11:11) at verifyENOENT (C:\Users\username\AppData\Roaming\npm\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:46:16) at ChildProcess.cp.emit (C:\Users\username\AppData\Roaming\npm\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:33:19) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

This is ionic info

cli packages: (C:\Users\username\AppData\Roaming\npm\node_modules) @ionic/cli-plugin-proxy : 1.5.6 @ionic/cli-utils : 1.19.0 ionic (Ionic CLI) : 3.19.0 global packages: cordova (Cordova CLI) : 8.0.0 local packages: @ionic/app-scripts : 3.1.6 Cordova Platforms : none Ionic Framework : ionic-angular 3.9.2 System: Node : v8.9.4 npm : 5.6.0 OS : Windows 10 Environment Variables: ANDROID_HOME : not set HTTP_PROXY : http://ip:port http_proxy : http://ip:port HTTPS_PROXY : http://ip:port https_proxy : http://ip:port IONIC_HTTP_PROXY : not set PROXY : not set proxy : not set Misc: backend : pro superagent: double callback bug

ionic serve runs well but within a minute, error raise.

ghost avatar Jan 11 '18 08:01 ghost

I am having the same error, is there a fix available? The problem is the same as explained above.

Chingaipe avatar Jan 14 '18 10:01 Chingaipe

i have the same problem too

stdevAlDen avatar Jan 15 '18 18:01 stdevAlDen

Same Error, as it got fixed when I restart my machine.

noor07 avatar Jan 20 '18 20:01 noor07

I uninstall current ionic version and install ionic 3.6.0, it works ok

ghost avatar Jan 21 '18 12:01 ghost

Same issue

eriscs01 avatar Jan 31 '18 15:01 eriscs01

Same problem:

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn "C:\Program Files\nodejs\node.exe" ENOENT
    at notFoundError (C:\Users\Learn\AppData\Roaming\npm\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:11:11)
    at verifyENOENT (C:\Users\Learn\AppData\Roaming\npm\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:46:16)
    at ChildProcess.cp.emit (C:\Users\Learn\AppData\Roaming\npm\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:33:19)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)

bhekor avatar Feb 27 '18 08:02 bhekor

try to uninstall it and install it again, it's your machine error...

noor07 avatar Feb 27 '18 08:02 noor07

Done that, but still

bhekor avatar Mar 01 '18 07:03 bhekor

Yup. Done reinstalling as well but still persists

eriscs01 avatar Mar 01 '18 08:03 eriscs01

The call stack is an evidence of node binary in execution, but the spawn failure would indicate a possible issue with the options passed to the custom launcher - cross-spawn. So I don't see any evidence of an issue with node, instead with the module(s). Looks like there are open issues reported against ionic, please track the progress there: https://github.com/ionic-team/ionic-cli/issues/2866

You may please re-open if it turns out to be a node issue.

gireeshpunathil avatar Mar 02 '18 04:03 gireeshpunathil