Ionic g page fails to create pages


#1

After running ionic generate page EventDetail i get the below error message

TypeError: undefined is not a function
at /Users/user/.nvm/v0.12.7/lib/node_modules/ionic/node_modules/@ionic/app-generators/index.js:23939:22
at Array.filter (native)
at filterAndCleanUpTemplates (/Users/user/.nvm/v0.12.7/lib/node_modules/ionic/node_modules/@ionic/app-generators/index.js:23938:8)
at Generator.renderAndWriteTemplates (/Users/user/.nvm/v0.12.7/lib/node_modules/ionic/node_modules/@ionic/app-generators/index.js:25310:133)
at /Users/user/.nvm/v0.12.7/lib/node_modules/ionic/node_modules/@ionic/app-generators/index.js:25304:26

undefined is not a function (CLI v2.1.14)

Your system information:

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.46
ios-deploy version: 1.8.6
ios-sim version: 5.0.12
OS: OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.2 Build version 7C68

Running npm version 4.0.3 and nvm 0.12.7. I’m not sure what else i have to do to update it was working fine before upgrading to version 2


#2

Your node version is ancient.