Hello, I’m trying to serve my app (it has been working since months ago), but now I can not use any command (ON THIS PROJECT, I have other projects and they work perfectly).
I can not use ionic info
, ionic serve
, anything it always says this error :
E:\IonicProjects\myApp\ionic3>ionic serve
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn C:\Program Files (x86)\nodejs\node.exe ENOENT
at notFoundError (E:\IonicProjects\myApp\ionic3\node_modules\cross-spawn\lib\enoent.js:11:11)
at verifyENOENT (E:\IonicProjects\myApp\ionic3\node_modules\cross-spawn\lib\enoent.js:46:16)
at ChildProcess.cp.emit (E:\IonicProjects\myApp\ionic3\node_modules\cross-spawn\lib\enoent.js:33:19)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
It works sometimes and the most of time it does not, and I want to know how to solve this issue…
Thanks.
Ya I’ve read this and I’ve tested all options… also from here : ENOENT problem
I’ve removed the modules_project from my ‘C:\Program Files (x86)\nodejs’ and removed the
"@ionic/cli-plugin-cordova": "1.5.0",
"@ionic/cli-plugin-ionic-angular": "1.4.0",
from my package.json
and now it says :
module.js:471
throw err;
^
Error: Cannot find module 'C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
I respoted the module_projects from recycleBin and now it still the same problem…
It is an open, unresolved bug on Ionic CLI in some specific environments, see the issue I linked to.
When you say this : Remove these two from package.json, nuke your node_modules and run npm install. Then see what the CLI does (Should prompt you to install the plugins)
with nuke means that I have to go to C:\Program Files (x86)\nodejs and delete the node_modules folder?
That’s what I had to do, until I installed nvm. So yes, delete by hand, then install nvm if you want a better method in future.
But there’s 2 node_modules
C:\Program Files (x86)\nodejs\node_modules\npm\node_modules
and
C:\Program Files (x86)\nodejs\node_modules
If I delete those what should I run? to install them again? Also I’ve removed the
“@ionic/cli-plugin-cordova”: “1.5.0”,
"@ionic/cli-plugin-ionic-angular": “1.4.0”,
And how do I install them again?