My Ionic cli broken after update?

After updating ionic I get this when I run any command:
Can anybody please help and explain what I can do to get things to work?

Caught exception: Error: Cannot find module 'colors/safe' 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.<anonymous> (/Users/hjalmarjakobsson/.nvm/v0.10.40/lib/node_modules/ionic/node_modules/winston/lib/winston/config.js:9:14) 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) at Module.require (module.js:364:17)

I realize that this might have something to do with a deprecated plugin or something similar but my knowledge in node is not that high so I don’t know how to solve this myself.

Don’t have any problems on my end, which versions do you have?

Good question.
I’m not quite sure becuase when I run either ionic -v or ionic info i get the same error msg.

The only command I ran before I got the error message was sudo npm install -g ionic.

my node version is v0.10.40

(Luckily I had already built and uploaded my app to iTunes connect before this happened. The reason why I tried to update ionic in the first place is because I couldn’t emulate my app with iPad Pro 12.9 as target and so I read somebody had succeeded emulating after having updated ionic. I wanted to emulate on ipad pro in order to take screenshots for the submission review…)

That’s super strange, what happens if you just delete all your node_modules and run npm install?
Got node v7.4.0 here

Oh wait! Never used Ionic 1 before, don’t even know how the node_modules work there

I don’t understand. How can I have a node version that starts with 0 and you 7?!? Is my version severely out-dated??

Yeah no idea what’s up with the version thing, maybe it’s becuase I’m on windows?

Else found this Issue on github, maybe that can help?

Hi again Nereus.

I just managed to update node to v7.6.4 and now i get a different error message and so now I get a completely different error message. Anyway, I want to thank you for having tried to help me. Thanks!!!


The error message I got now had to do with there being something wrong with node-sass.
Running node rebuild node-sass solved the problem.
Taken from: https://github.com/sass/node-sass/issues/1764

Nice dude! :ok_hand: