aqueduct
aqueduct copied to clipboard
aqueduct create crashes with "Uncaught Error: Bad State "
I can't get aqueduct create
to work. The error message is as follows:
$ aqueduct create scoutventory_backend
-- 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/myuser/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)
****
This happens regardless of the project name I enter. Also, a folder for the project is created. However it remains empty and the program crashes.
Same Herer with the same version, using Windows 10, the same if try to create inside VSCode Extension.
What is your PUB_CACHE environment variable?
I don't have it set. I'm on windows.
So default path would be %APPDATA%\Pub\Cache
experiencing same thing, also on windows 10
I'm also experiencing the same issue.
-- 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 CLITemplateList.handle (package:aqueduct/src/cli/commands/create.dart:298:53)
* #4 CLICommand.process (package:aqueduct/src/cli/command.dart:159:20)
* <asynchronous suspension>
* #5 CLICommand.process (package:aqueduct/src/cli/command.dart:135:12)
* #6 CLICommand.process (package:aqueduct/src/cli/command.dart:135:12)
* #7 main (file:///C:/Users/bett/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)
****
Same thing, also on windows 10
I am experiencing the same issue on windows 10
I am experiencing the same issue on windows 10
Hi All, I added the following ENVIRONMENT VARIABLES and added an entry to the PATH variable, then reinstalled Aqueduct and it suddenly started working. Not sure what happened.
NEW VARIABLES
PATH VARIABLE ENTRIES:
Any idea? same issue here .. :)
Any solve ? I face the same issue .
Any idea? same issue here .. :)
Have you tried what i did?
@kamaribedwarddev this solution did not work for me .
The Solution as @kamaribedwarddev said but it works for me when I changed PUB_HOSTED_URL to https://pub.dev .
Thank You @kamaribedwarddev !
Thank you for your comments and suggestions @kamaribedwarddev @OmarBakry-eg you helped me a lot.
The Solution as @kamaribedwarddev said but it works for me when I changed PUB_HOSTED_URL to https://pub.dev . Thanks @OmarBakry-eg
For Flutter people, set PUB_CACHE to "Flutter_Directory\.pub-cache". In my computer it is C:\flutter\.pub-cache
Logout from your account so that environment variables get updated. After that activate aqueduct again pub global activate aqueduct For Flutter folks: flutter pub global activate aqueduct
You are all welcome ! @bahadurvaibhav , @javierxnora
I am experiencing the same issue on windows 10
Hi All, I added the following ENVIRONMENT VARIABLES and added an entry to the PATH variable, then reinstalled Aqueduct and it suddenly started working. Not sure what happened.
NEW VARIABLES
PATH VARIABLE ENTRIES:
worked for me! thank you so much!
I'm also experiencing the same issue.
-- 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 CLITemplateList.handle (package:aqueduct/src/cli/commands/create.dart:298:53) * #4 CLICommand.process (package:aqueduct/src/cli/command.dart:159:20) * <asynchronous suspension> * #5 CLICommand.process (package:aqueduct/src/cli/command.dart:135:12) * #6 CLICommand.process (package:aqueduct/src/cli/command.dart:135:12) * #7 main (file:///C:/Users/bett/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) ****
I too couldn't solve the issue by implementing the above-quoted solutions.. can anybody help?
Make sure you are in a writable directory. The default cmd path on win 10 is "C:\WINDOWS\system32>" Changing directory worked for me (with the above solution)
I am experiencing the same issue on windows 10
Hi All, I added the following ENVIRONMENT VARIABLES and added an entry to the PATH variable, then reinstalled Aqueduct and it suddenly started working. Not sure what happened.
NEW VARIABLES
PATH VARIABLE ENTRIES:
worked for me! thank you so much!
The error still occuring even after tried with above ways
@yhhCh405-CS yea, i guess they have stopped the support only.. or maybe the community is really small. Anyways, i started using django(node too) for backend... Firebase is pretty powerful too along with firebase cloud functions... Just lemme know if anybody can find the Solution.
I am experiencing the same issue on windows 10
Hi All, I added the following ENVIRONMENT VARIABLES and added an entry to the PATH variable, then reinstalled Aqueduct and it suddenly started working. Not sure what happened. NEW VARIABLES
PATH VARIABLE ENTRIES:
worked for me! thank you so much!
Worked for me aswell, thank you!!!
IMPORTANT STEP, REINSTALL AQUEDUCT AFTER THE ENTRIES
The first time i tried, i didn't see that.
Followed those instructions with the environment and pub_cache still get the error.
The Solution as @kamaribedwarddev said but it works for me when I changed PUB_HOSTED_URL to https://pub.dev . Thanks @OmarBakry-eg
For Flutter people, set PUB_CACHE to "Flutter_Directory.pub-cache". In my computer it is C:\flutter.pub-cache
Logout from your account so that environment variables get updated. After that activate aqueduct again pub global activate aqueduct For Flutter folks: flutter pub global activate aqueduct
This worked for me, Thank You!
i have no pub_cache folder inside pub_dartlang.org folder any help plz
Does anyone have a solution for this same error but on the Mac system?
Does anyone have a solution for this same error but on the Mac system?
I have the as problem. I using a Mac and I have DART and FLUTTER installed! Any solution for Mac users?
" By default, this directory is located under .pub-cache in your home directory (on Mac and Linux), or in %LOCALAPPDATA%\Pub\Cache (on Windows). " - Dart Dev Tools
11/21/2020 , Same thing, also on windows 10.