Cannot find module 'config-chain'

I just recently installed ionic v2 and tried to scaffold a starter project but I keep on getting this error.

You need to have the alpha version of the CLI in order to start a project with v2. Ionic CLI Version 1.7.8 is the latest stable release. In order to install alpha you need to run:

npm install -g ionic@alpha

then when you run ionic info it should give you this:

Ionic CLI Version: 2.0.0-alpha.23

when run ionic build with the same error :smile:

Ionic CLI Version: 2.0.0-alpha.23
Ionic App Lib Version: 2.0.0-alpha.22

Yup still getting the same error

Ionic CLI Version: 2.0.0-alpha.23
Ionic App Lib Version: 2.0.0-alpha.22

I had to downgrade my node and npm versions to get it all to work:

$ node -v
v0.12.7
$ npm -v
2.11.3

have the same issue…
try to update and downgrade all… nothing works…
any ideas?

Cordova CLI: 5.4.0
Ionic Version: 1.1.1
Ionic CLI Version: 1.7.8
Ionic App Lib Version: 0.6.4
ios-deploy version: 1.8.2
ios-sim version: 5.0.3
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.1.1 Build version 7B1005

ok is fixed with Ionic CLI 1.7.10 or Alpha.
My version was 1.7.8.

It seems that some people have gotten this after upgrading node, some say from upgrading ionic, some say upgrading/downgrading node/ionic fixes it. If anyone could describe when exactly it started happening that would be very helpful as I’ve been unable to reproduce it yet :smile: Thanks!

Update
Upgrading to Node v5.1.0 fixed the problem for me. Thanks for the help guys

Who ever faces this problem, please do a clean install of ionic

npm install -g ionic

if it got installed and you’re still facing issues, easily install each missing module you face, globally

example
npm install -g config-chain

this will re-install all missing modules, as this might have happened when you upgraded your node

1 Like

After Updating my node version to 5, I am having the same issue here. Tried downgrading it to 4 and to 0.12.7, and also clean installed ionic, Still not luck in running ionic application

What a pain in the a$$ but it worked! Finally! THANK YOU!

I had to update the ionic version: npm update -g ionic