I have tried to install ionic by doing npm install ionic
ionic start myapp blank does not work and since then any npm commands tells me :
$ npm config
node:internal/modules/cjs/loader:927
throw err;
^
Error: Cannot find module 'C:\Users\dandonneau.m\devc\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
at Function.Module._load (node:internal/modules/cjs/loader:769:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
at node:internal/main/run_main_module:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Could not determine Node.js install directory
I had the same error because I was using a too new version of Node for my system.
I have Windows 7.
The last officially tested version of Node on Windows 7 is 13.6.0 (source). Although, you can also try to run newer versions such as 15.8.0 (source).
The bug occurred when I tried to use Node version 17.1.0.
Solution
If you happen to install Node over already installed NVM, you might need to delete that installed Node version and re-install NVM (that helped in my case I executed a PowerShell script that installed Node over my NVM) here is the link to install the NVM for Windows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With