0

when I followed the steps to create new project of aqueducts at Getting Started with Aqueduct I got error when I create a new project

Error :

C:\Users\khalifa>aqueduct create store1
-- 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/khalifa/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._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
  ****

version of dart is :

Dart VM version: 2.8.4 (stable) (Wed Jun 3 12:26:04 2020 +0200) on "windows_x64"
Khalifa Alkhatri
  • 244
  • 1
  • 4
  • 20

2 Answers2

0
pub global activate aqueduct 3.3.0+1
Hamed
  • 5,867
  • 4
  • 32
  • 56
-2

I'm quiet sure you haven't done pub global activate aqueduct

stackTrace points to line 342

   341 .getGlobalApplications()
   342 .firstWhere((app) => app.name == "aqueduct")

firstWhere() throws StateError("No element") when no element in Iterable

Sergey Salnikov
  • 1,671
  • 7
  • 17