Ionic serve spawn ENOENT windows 10


#1

I have created my first app, and when the app was started with the in the localhost server (ionic serve), the following error appears in the command line:

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

Error: spawn “C:\Program Files\nodejs\node.exe” ENOENT
at notFoundError (C:\Users\elisea\AppData\Roaming\npm\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (C:\Users\elisea\AppData\Roaming\npm\node_modules\ionic\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (C:\Users\elisea\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)

Then I tried to create another app, with the command ionic start, but the same error appears.

Following the ionic info:

[WARN] You are not in an Ionic project directory. Project context may be missing.

cli packages: (C:\Users\elisea\AppData\Roaming\npm\node_modules)

@ionic/cli-plugin-proxy : 1.5.4
@ionic/cli-utils        : 1.16.0
ionic (Ionic CLI)       : 3.16.0

System:

Node : v8.9.0
npm  : 5.5.1
OS   : Windows 10

How can I solve the issue?

Thanks.


#2

Hello,

maybe you have not sufficient rights on the nodejs folder.

Maybe something with our enviroment paths are wrong.

Bye the way nvm for windows let you switch between different node versions and can be very helpful.

Maybe you can delete your nodejs installation, start as administartor, install nvm, install node using nvm.

Best regards, anna-liebt