Error creating projects with Ionic@beta


#1

Both ionic start MyIonic2Project --v2, ionic start MyIonic2Project tutorial --v2 and ionic start MyIonicProject generate the same error:

add to body class: platform-ios
Error updating config.xml file: TypeError: undefined is not a function
 ✗ TypeError: undefined is not a function
    at Object.module.exports.create (/usr/local/lib/node_modules/ionic/node_modules/xml2js/node_modules/xmlbuilder/lib/index.js:16:22)
    at Builder.exports.Builder.Builder.buildObject (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:165:29)
    at /usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/start.js:860:33
    at Parser.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:384:20)
    at Parser.emit (events.js:107:17)
    at Object.onclosetag (/usr/local/lib/node_modules/ionic/node_modules/xml2js/lib/xml2js.js:348:26)
    at emit (/usr/local/lib/node_modules/ionic/node_modules/xml2js/node_modules/sax/lib/sax.js:615:33)
    at emitNode (/usr/local/lib/node_modules/ionic/node_modules/xml2js/node_modules/sax/lib/sax.js:620:3)
    at closeTag (/usr/local/lib/node_modules/ionic/node_modules/xml2js/node_modules/sax/lib/sax.js:861:5)
    at Object.write (/usr/local/lib/node_modules/ionic/node_modules/xml2js/node_modules/sax/lib/sax.js:1294:29)

It happened when I used the latest ionic v2 beta.

NPM version: 3.8.5
Cordova version: 6.1.1

Anyone ever faced this?


#2

Have you install ionic 2,
npm install -g ionic@beta?


#3

I too am experiencing this error, while trying to do a TypeScript project.

Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Version: 2.0.0-beta.3
Ionic CLI Version: 2.0.0-beta.23
Ionic App Lib Version: 2.0.0-beta.13
ios-deploy version: Not installed
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.2.1 Build version 7C1002


#4

Yes, I used that command