puro
puro copied to clipboard
Error when using puro standalone with an absolute path
I get a warning/error message when I try to use puro standalone with an absolute path, even though it seems to work fine.
~/Projects/puro_project > /Users/username/Projects/puro_project/bin/puro --version
[W] Error while parsing package configBad state: No element
#0 ListBase.firstWhere (dart:collection/list.dart:132)
#1 PuroVersion._getRootFromPackageConfig (package:puro/src/version.dart:83)
<asynchronous suspension>
#2 PuroVersion.provider.<anonymous closure> (package:puro/src/version.dart:139)
<asynchronous suspension>
#3 VersionCommand.run (package:puro/src/commands/version.dart:35)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:212)
<asynchronous suspension>
#5 main (package:puro/src/cli.dart:256)
<asynchronous suspension>
[i] Puro 1.4.6 (standalone/darwin-x64)
Dart 3.3.3 (stable) (Tue Mar 26 14:21:33 2024 +0000) on "macos_x64"
But when I use puro with a relative path, I get no warning/error message.
~/Projects/puro_project > ./bin/puro --version
[i] Puro 1.4.6 (standalone/darwin-x64)
Dart 3.3.3 (stable) (Tue Mar 26 14:21:33 2024 +0000) on "macos_x64"
When I install puro and then use it with an absolute path, it also works just fine.
~/Projects/puro_project > /Users/username/.puro/bin/puro --version
[i] Puro 1.4.6 (distribution/darwin-x64)
Dart 3.3.3 (stable) (Tue Mar 26 14:21:33 2024 +0000) on "macos_x64"
In this case I used puro standalone 1.4.6 on MacOS. It seems that this problem only occurs in the standalone version.