因此,我使用pub global activate aqueduct安装了水槽包,并将pub bin的目录添加到环境变量的Path中。但是,当我尝试通过键入aqueduct create <project-name>来创建一个新项目时,我收到以下错误。
-- Aqueduct CLI Version: 3.3.0+1 *** Uncaught error Bad state: No element **** Stacktrace * #0 ListMixin.firstWhere (dart:collection/list.dart:150:5) * #1 CLIAqueductGlobal.aqueductPackageRef (package:aqueduct/src/cli/commands/create.dart:342:10) * #2 CLIAqueductGlobal.templateDirectory (package:aqueduct/src/cli/commands/create.dart:347:12) * #3 CLIAqueductGlobal.getTemplateLocation (package:aqueduct/src/cli/commands/create.dart:351:12) * #4 CLITemplateCreator.handle (package:aqueduct/src/cli/commands/create.dart:51:27) * #5 CLICommand.process (package:aqueduct/src/cli/command.dart:159:20) * <asynchronous suspension> * #6 CLICommand.process (package:aqueduct/src/cli/command.dart:135:12) * #7 main (file:///C:/Users/Zisei/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/aqueduct-3.3.0+1/bin/aqueduct.dart:9:27) * #8 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32) * #9 _RawReceivePortImpl
这个问题的解决方案是什么?
发布于 2020-06-22 19:39:47
面对同样的问题,有个朋友让我这么做。先卸载dart-sdk,然后在web中安装choco搜索如何安装,然后运行下面的推荐行choco install dart-sdk -- version =2.7.1你必须安装2.7.1版本,同样的问题,面对我,一些朋友告诉我这样做
https://stackoverflow.com/questions/62442871
复制相似问题