0

So I installed the aqueduct package using pub global activate aqueduct, and I added the directory of the pub bin to the Path in environment variables. However, when I try to create a new project by typing in aqueduct create <project-name>, I receive the following error.

-- 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

What's the solution for this?

Zisei
  • 23
  • 7

1 Answers1

0

same problem face me some friend told me to do that . first uninstall dart-sdk then install choco search in web how to install then run this commend line choco install dart-sdk --version=2.7.1 you must install version 2.7.1 that it same problem face me some friend told me to do that

hamza
  • 31
  • 2