离子错误:发生器仅适用于离子2项目 [英] Ionic error: Generators are only available for Ionic 2 projects
本文介绍了离子错误:发生器仅适用于离子2项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行$ ionic generate page pageName
会导致错误:
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
这是从ionic v2项目开始的,但是我认为我已经更新到ionic3.按照说明更新到CLI v3,我仍然遇到同样的错误.
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.
推荐答案
找到了解决方法,但不知道这是否是实际答案.我需要添加以下行:
Found a fix, but don't know if this is the actual answer. I needed to add the lines:
"typescript": true,
"v2": true
到文件ionic.config.json
.仅添加"typescript": true,
是不够的.
To the file ionic.config.json
. Adding just the "typescript": true,
was not enough.
这篇关于离子错误:发生器仅适用于离子2项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文