Is Ionic compatible with Cordova 4.1.2?

I own a Ionic project that used (since 1 hour), cordova 3.1.5.

I did: sudo npm update -g cordova@latest.

It installed me cordova 4.1.2.

However, when I want to update Ionic plateforms, I get:

$sudo ionic platform update ios

    throw err;
Error: Cannot find module 'shelljs'

Error: Cannot find module 'shelljs'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/michael/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/update:21:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
Error: /Users/michaelazerhad/.cordova/lib/npm_cache/cordova-ios/3.7.0/package/bin/update: Command failed with exit code 8
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

How to fix it?
(Ionic version is: 1.2.8)

Thanks !

just do

npm install shelljs

I succeed by removing the platform and reinstalled it. Of course installing shelljs in the place evoked by the error.

i’ve tried removing then adding platform and then npm installing shelljs. still same error. other suggestions?

Try this . Solved the problem for me

nope. that did not work. still getting “Command failed with exit code 65” after running ionic run ios.

Try to make new app with Ionic cli: sudo ionic start app name. Then copy the www folder of your app into this new app. Try to add platforms in new app.

i’m on to a new unrelated error after following your instructions. so i guess it worked.