ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

Caught exception Cannot find module 'lodash/assign'

Open ryasan opened this issue 10 years ago • 23 comments

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. (/usr/local/lib/node_modules/ionic/node_modules/xmlbuilder/lib/index.js:5:12) at Object. (/usr/local/lib/node_modules/ionic/node_modules/xmlbuilder/lib/index.js:14:4) 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)

ryasan avatar Aug 17 '16 14:08 ryasan

Same here when I run bower update ionic

yoricktran avatar Aug 21 '16 17:08 yoricktran

Same for me after installing node v6.4.0

polouis avatar Aug 25 '16 10:08 polouis

+1

alairjt avatar Aug 29 '16 23:08 alairjt

Same for me

BraveVN avatar Aug 30 '16 10:08 BraveVN

+1

doug-shontz avatar Aug 30 '16 22:08 doug-shontz

+1

iBasit avatar Aug 31 '16 15:08 iBasit

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.

BraveVN avatar Sep 01 '16 02:09 BraveVN

i have the same issue :( trying to unistall then reinstall not works :( any help ?

trinhvanhuy avatar Oct 13 '16 04:10 trinhvanhuy

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!

lnavarrocarter avatar Oct 13 '16 17:10 lnavarrocarter

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

ihachani avatar Nov 13 '16 12:11 ihachani

Thanks ! works for me

gchandrapati avatar Dec 05 '16 17:12 gchandrapati

Same problem here with; node 6.6.0

roboflank avatar Dec 26 '16 07:12 roboflank

Same problem, re-install didn't help

evgeniyM avatar Dec 28 '16 15:12 evgeniyM

@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

vinchauhan avatar Dec 29 '16 15:12 vinchauhan

I've switched back to node v4.2.6 and i don't get this error

evgeniyM avatar Dec 29 '16 15:12 evgeniyM

reinstalling ionic and cordova works - I guess I updated ionic earlier on a choppy network which started all this

node 7.0.0

vinchauhan avatar Dec 29 '16 15:12 vinchauhan

Thanks @ihachani. Works for me.

luciandarabus avatar Dec 31 '16 21:12 luciandarabus

thanks ihachani

bdmshezar avatar Jan 02 '17 05:01 bdmshezar

just run npm install lodash...mine solve!!

HarisHamdan avatar Jan 12 '17 04:01 HarisHamdan

Thanks ihachani :)

nanchao-p avatar Jan 13 '17 07:01 nanchao-p