Ionic wont start after npm install ionic

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

Im on osx. I had a development with node, npm and ionic. Everything worked. I accidentally run this command:

npm install -g ionic

After that Ionic is not working anymore. if I try to create a project or start an existing one I got this error:

Caught exception:
Error: Cannot find module 'inherits'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/glob/glob.js:42:14)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3) 

Mind letting us know? https://github.com/driftyco/ionic-cli/issues

npm -v gives:

3.10.8

node -v gives:

v6.4.0

ionic -v gives the same error message as above. Im not sure if I installed node/npm with brew or what else. Any ideas?

profilepic.png
manpreet 2 years ago

in my case , uninstalling and reinstalling the ionic worked .

1.npm uninstall -g ionic cordova

2.npm install -g ionic cordova

3.npm update minimatch

4.try reinstalling ionic using ionic@latest


0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.