Cannot find module 'minimatch'

Hi,
i am newly installed ionic, after installation restart my pc, after i created sample project and add platform to project but i am getting following error

harish@DEV-10:~/Test$ ionic platform add android
Updated the hooks directory to have execute permissions
Downloading Default Ionic Resources
Downloading: https://github.com/driftyco/ionic-default-resources/archive/master.zip
[=============================] 100% 0.0s
Done adding default Ionic resources
Adding icons for platform: android
module.js:338
throw err;
^
Error: Cannot find module 'minimatch’
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/cordova-common/node_modules/glob/glob.js:44:17)
at Module._compile (module.js:460:26)
at Object.Module._extensions…js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)

my ionic version is
harish@DEV-10:~/Test$ ionic -v
1.7.12

harish@DEV-10:~/Test$ node -v
v0.12.2

Please help me any solution for this issue.

Advance thanks
Prime

Hey, how are you?

I had the same problem yesterday.

What I did was : npm install -g minimatch

If you got any other errors like this one, just run npm install -g

I tried this and the minimatch error goes away. However other modules can’t be found errors happen. :frowning:

Yeah, that should happen. Just keep doing npm install -g on the missing packages