Error when trying to install Ionic with sudo npm install -g ionic
Caught exception:
Error: Cannot find module 'lodash/assign'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.
at Object.
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
Same here when I run bower update ionic
Same for me after installing node v6.4.0
+1
Same for me
+1
+1
I managed to try with a solution:
First, uninstall ionic with this command
sudo npm uninstall -g cordova ionic
and then re-install it
sudo npm install -g cordova ionic
It works for me.
Hope it helps.
i have the same issue :(
trying to unistall then reinstall not works :(
any help ?
Hello try this is:
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash
sudo npm uninstall -g cordova ionic
sudo apt-get install -y nodejs
sudo apt autoremove
sudo apt-get install -y build-essential
sudo npm install -g cordova ionic
greats!
Try reinstalling ionic and cordova and don't forget to empty npm cache
npm uninstall -g ionic cordova
npm cache clean
npm install -g ionic cordova
I hope this helps
Node version 6.9.0
Thanks ! works for me
Same problem here with;
node 6.6.0
Same problem, re-install didn't help
@evgeniyM - Did you resolve it ? - I am in the same situation, looks like something is messed up with new ionic package - I updated it and started getting it
I've switched back to node v4.2.6 and i don't get this error
reinstalling ionic and cordova works - I guess I updated ionic earlier on a choppy network which started all this
node 7.0.0
Thanks @ihachani. Works for me.
thanks ihachani
just run npm install lodash...mine solve!!
Thanks ihachani :)
Thanks its work me ihachani :)
Thanks...wow really late but as newer node versions came out the problem just went away.
My system was using node 4.4, incompatible with ionic, where I had first installed cordova and ionic. I had to uninstall cordova and ionic from that node version, then use nvm to use node 6.10+ instead, then install cordova and ionic there under node 6.10+, and it worked no problem.
Most helpful comment
Try reinstalling ionic and cordova and don't forget to empty npm cache
I hope this helps
Node version 6.9.0