I’m trying to set up Ionic on a new machine. I’ve installed node (v5) and ionic@beta, plus tried cordova@latest.
This is the output when I try and run ionic build ios:
Running 'build:before' gulp task before build
[11:38:48] Starting 'clean'...
[11:38:49] Finished 'clean' after 22 ms
[11:38:49] Starting 'build'...
[11:38:49] Starting 'sass'...
[11:38:49] Starting 'html'...
[11:38:49] Starting 'fonts'...
[11:38:49] Starting 'scripts'...
[11:38:49] Finished 'scripts' after 62 ms
[11:38:49] Finished 'html' after 72 ms
[11:38:49] Finished 'fonts' after 84 ms
[11:38:50] Finished 'sass' after 1.3 s
[11:39:00] Finished 'build' after 11 s
[11:39:00] Starting 'build:before'...
[11:39:00] Finished 'build:before' after 7.73 μs
Using this version of Cordova with older version of cordova-ios is being deprecated. Consider upgrading to cordova-ios@4.0.0 or newer.
Running command: /Users/James/Sites/app/hooks/after_prepare/010_add_platform_class.js /Users/James/Sites/app
add to body class: platform-ios
Running command: /Users/James/Sites/app/platforms/ios/cordova/build
module.js:341
throw err;
^
Error: Cannot find module 'cordova-common'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
at Module.require (module.js:367:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/Users/James/Sites/app/platforms/ios/cordova/Api.js:25:20)
at Module._compile (module.js:413:34)
at Object.Module._extensions..js (module.js:422:10)
at Module.load (module.js:357:32)
at Function.Module._load (module.js:314:12)
at Module.require (module.js:367:17)
Error: /Users/James/Sites/app/platforms/ios/cordova/build: Command failed with exit code 1
And ionic info:
Your system information:
Cordova CLI: 6.1.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
ios-deploy version: 1.8.6
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v5.11.1
Xcode version: Xcode 7.3.1 Build version 7D1014
Can anyone point me in the right direction?