Error: Cannot find module '/Users/SubEffect/node_modules/ionic'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at /usr/local/lib/node_modules/ionic/bin/ionic:18:13 code: 'MODULE_NOT_FOUND' }
after installing ionic, and using “ionic start myApp”
Where are you running the commands, which folder are you in in your command line?
Output of npm list -g --depth=0 please.
Did you have Ionic installed on this machine before?
Using sudo is always a red flag to me and should not really be necessary…
One solution: Uninstall your node, install nvm (or nvm-windows if you are on Windows), install a new node (which includes npm) with this, then install ionic and cordova again and try your command again. The problem should be gone.
Hm, is there a package.json in you user directory? Can you post its content?
Try renaming the node_modules folder in there to something else and try to create a project again.
You probably ran “npm install ionic” instead of “npm install -g ionic” in your user directory some time ago. This installed it into node_modules there which was no problem when you were inside a project, which has its own Ionic CLI installation, but only when you want to access Ionic CLI in the user directory. The global installation gets triggered and looks for a local installation (which it normally doesn’t find for ionic start) and uses that one. As your in the user directory was broken, you got an error.