【发布时间】:2017-01-06 12:28:41
【问题描述】:
我正在使用 WebStorm 2016.3.2(现在是最新版本)。
当我尝试创建一个新的 Dart 项目时,生成示例内容它只带来了两个示例:
- Dart Wep 应用程序
- Dart 命令行应用程序
在旧的 WebStorm 版本上,有更多选项,例如 Angular、Polymer 等。
有没有办法让 WebStorm 获得更多选择,特别是 Angular?
【问题讨论】:
我正在使用 WebStorm 2016.3.2(现在是最新版本)。
当我尝试创建一个新的 Dart 项目时,生成示例内容它只带来了两个示例:
在旧的 WebStorm 版本上,有更多选项,例如 Angular、Polymer 等。
有没有办法让 WebStorm 获得更多选择,特别是 Angular?
【问题讨论】:
WebStorm 使用 stagehand 包从模板创建项目。
如果您检查https://pub.dartlang.org/packages/stagehand,您会看到Polymer 在1.0.19 中被删除
下面我的 WebStorm 的截图显示了 2 个 Angular 模板
要让您的安装stagehand 更新到最新版本,请执行
pub global activate stagehand
我不确定这是否是您没有列出 Angular 模板的原因。
【讨论】:
C:\dart-sdk\bin>pub global activate stagehand Package stagehand is currently active at version 1.0.14. Resolving dependencies... ... Precompiling executables... Loading source assets... Failed to precompile stagehand:stagehand: Unhandled exception: Could not import "package:http/http.dart" from "package:stagehand/src/cli_app.da rt": Failure getting http://localhost:55713/packages/http/http.dart: 404 Not Found null
Failed to precompile stagehand:stagehand: Unhandled exception: Could not import "package:http/http.dart" from "package:stagehand/src/cli_app.da rt": Failure getting http://localhost:55713/packages/http/http.dart: 404 Not Found null
pub cache repair,然后再试一次