Ionic error: Generators are only available for Ionic 2 projects

谁说我不能喝 提交于 2019-12-11 03:08:02

问题


Running $ ionic generate page pageName results in the error:

Generators are only available for Ionic 2 projects (CLI v2.2.2)

Your system information:

Cordova CLI: 7.0.1
Ionic Framework Version: 2.3.0
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.1.4
ios-deploy version: 1.9.1 
ios-sim version: 5.0.13 
OS: macOS Sierra
Node Version: v8.0.0
Xcode version: Xcode 8.3.3 Build version 8E3004b

This is in what started as an ionic v2 project, but I thought I had updated to ionic 3. After following instructions to update to CLI v3, I still get this same error.


回答1:


Found a fix, but don't know if this is the actual answer. I needed to add the lines:

"typescript": true,
"v2": true

To the file ionic.config.json. Adding just the "typescript": true, was not enough.



来源:https://stackoverflow.com/questions/44620882/ionic-error-generators-are-only-available-for-ionic-2-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!