When I try to create an ionic project I get this error:
Error: Cannot find module 'config-chain'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/Users/Taylor/.npm-packages/lib/node_modules/ionic/node_modules/ionic-app-lib/node_modules/ionic-cordova-lib/node_modules/npm/lib/config/core.js:2:10)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
Cannot find module 'config-chain' (CLI v1.7.10)
Your system information:
Cordova CLI: Not installed
Ionic CLI Version: 1.7.10
Ionic App Lib Version: 0.6.5
ios-deploy version: Not installed
ios-sim version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v5.0.0
Xcode version: Xcode 7.1.1 Build version 7B1005
Apparently, cordova isn’t installing, but I don’t know why. I’ve tried running npm install -g cordova several times but it keeps telling me that cordova isn’t installed.
Any ideas what the problem might be and how I can fix it?
So, I tried running sudo ionic start myApp just to see if something was wrong with the permissions. I still got the same error but now it is saying that Cordova is installed.
Not sure, if this changes anything though.
Your system information:
Cordova CLI: 5.4.0
Ionic CLI Version: 1.7.10
Ionic App Lib Version: 0.6.5
ios-deploy version: Not installed
ios-sim version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v5.0.0
Xcode version: Xcode 7.1.1 Build version 7B1005
Thanks @tanderson018 , I’m still unable to reproduce this, and trying to figure out where things are going wrong. It’s weird that upgrading or downgrading node or npm has fixed it for some people.
If you do npm cache clean and then reinstall ionic does that help?