Error: Cannot find module 'inherits'

Hello,

I just try to update (yesterday) my ionic 2 project with :
npm install -g ionic
and now ionic stop to work and I have this message (before all was OK)

 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> (C:\Users\THIERRY\AppData\Roaming\npm\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)

Even I just write : ionic.

npm -v : 3.10.7
node -v : 6.5.0
cordova -v : 6.2.0
Windows 10

If someone cloud help me, thanks in advance.

Thierry

what do you get when you execute

ionic info

I think your upgrade didn’t go well

thanks,

yes before, but now I can’t I obtain this message for each CLI start with ionic

Okay, Thanks for your help, that was very friendly.

Ok the answer for other that have same problem.

CLI :
npm uninstall -g ionic cordova
npm install -g ionic cordova
and if you need
npm update minimatch

By

1 Like

Hello,

having the same problem, same error.
tried uninstall/install cordova and ionic, nothing helps… can’t do ionic info

stuck with the first project.

node --version
v6.10.1
$ nvm --version
0.33.1
$ cordova --version
6.5.0
$ uname -v
Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64

Johan.