I’m trying to install the Ionic 2 Conference Application by following the steps in the Getting Started section, but I keep getting an error
TypeError: Cannot read property 'then' of undefined
at Object.run (C:\Users\luis\AppData\Roaming\npm\node_modul
js:135:14)
at Object.<anonymous> (C:\Users\luis\AppData\Roaming\npm\no
bin\ionic:9:10)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:118:18)
at node.js:952:3
Cannot read property 'then' of undefined (CLI v2.0.0-alpha.23)
Your system information:
Cordova CLI: 5.3.3
Gulp version: CLI version 3.8.11
Gulp local:
Ionic Version: 2.0.0-alpha.34
Ionic CLI Version: 2.0.0-alpha.23
Ionic App Lib Version: 2.0.0-alpha.22
OS: Windows 10
Node Version: v4.1.2
I’m not using the conference app, I’m developing my own app. But I just upgraded to the latest version of ionic by running
npm install ionic-framework
and now when I run
ionic info
I get the same error message you got i.e
TypeError: Cannot read property ‘then’ of undefined
at Object.run (/Users/richardshergold/.npm-packages/lib/node_modules/ionic/lib/cli.js:135:14)
at Object. (/Users/richardshergold/.npm-packages/lib/node_modules/ionic/bin/ionic:9:10)
at Module._compile (module.js:460:26)
at Object.Module._extensions…js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
Cannot read property ‘then’ of undefined (CLI v2.0.0-alpha.23)
Your system information:
Cordova CLI: 5.4.0
Gulp version: CLI version 3.9.0
Gulp local:
Ionic Version: 2.0.0-alpha.31
Ionic CLI Version: 2.0.0-alpha.23
Ionic App Lib Version: 2.0.0-alpha.22
ios-deploy version: 1.8.2
ios-sim version: 5.0.3
OS: Mac OS X Yosemite
Node Version: v0.12.4
Xcode version: Xcode 7.1.1 Build version 7B1005
Hey,
This is a known issue and it is currently being worked on. There’s a github issue for it here:
https://github.com/driftyco/ionic2/issues/577
1 Like
I upgraded to ionic .35 in hopes that it would resolve the issue but it’s still there.
Your system information:
Cordova CLI: 5.3.3
Gulp version: CLI version 3.8.11
Gulp local:
Ionic Version: 2.0.0-alpha.35
Ionic CLI Version: 2.0.0-alpha.23
Ionic App Lib Version: 2.0.0-alpha.22
OS:
Node Version: v5.1.0
@brandyshea thank you. I’ll wait for the fix.
Hi @brandyshea, I updated to the latest version of ionic 2 and I am getting an error when I run the ionic serve command.
Please help!
Cordova CLI: 5.3.3
Gulp version: CLI version 3.8.11
Gulp local:
Ionic Version: 2.0.0-alpha.35
Ionic CLI Version: 2.0.0-alpha.25
Ionic App Lib Version: 2.0.0-alpha.24
OS:
Node Version: v5.1.0
For anybody else facing this issue, here’s how I got it to work:
- I moved the whole folder to the C: drive
- Manually edited the package.json file and updated the ionic-framework dependency to alpha.38
- Ran npm install ionic-framework --save
Now the conference app runs as expected. Great job ionic team!!!