Ionic 错误:生成器仅适用于 Ionic 2 项目 [英] Ionic error: Generators are only available for Ionic 2 projects
本文介绍了Ionic 错误:生成器仅适用于 Ionic 2 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
运行$ ionic generate page pageName
会报错:
这是作为 ionic v2 项目开始的,但我认为我已经更新到 ionic 3.在 按照说明更新到 CLI v3,我仍然遇到同样的错误.
解决方案
找到了解决方法,但不知道这是否是实际答案.我需要添加以下行:
"typescript": true,v2":真
到文件 ionic.config.json
.仅添加 "typescript": true,
是不够的.
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.
解决方案
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.
这篇关于Ionic 错误:生成器仅适用于 Ionic 2 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文