Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read packages spec #3175

Open
nan-yu opened this issue Mar 4, 2025 · 0 comments
Open

Cannot read packages spec #3175

nan-yu opened this issue Mar 4, 2025 · 0 comments

Comments

@nan-yu
Copy link

nan-yu commented Mar 4, 2025

What happened?

The .dart_tool/package_config.json file is missing when running the dartpad frontend code from the main branch.
However, I'm still able to run the app even with the error.

Note: The error is gone when switching to the gen-ai branch.

Steps to reproduce problem

  1. Check out the main branch.
  2. Run dart pub get to generate the package configuration file.
  3. Run the dartpad frontend: flutter run -d chrome --web-port 8888 --web-browser-flag "--disable-web-security".

Additional info

Dart

Dart version:

$ dart --version
Dart SDK version: 3.7.0 (stable) (Wed Feb 5 04:53:58 2025 -0800) on "macos_arm64"

Error:

$ flutter run -d chrome --web-browser-flag "--disable-web-security"
Resolving dependencies in `/usr/local/google/home/nanyu/projects/dart-pad`... (1.5s)
Downloading packages... 
  async 2.12.0 (2.13.0 available)
  fake_async 1.3.2 (1.3.3 available)
  leak_tracker 10.0.8 (10.0.9 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  pointycastle 3.9.1 (4.0.0 available)
  vm_service 14.3.1 (15.0.0 available)
Got dependencies in `/usr/local/google/home/nanyu/projects/dart-pad`!
6 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Launching lib/main.dart on Chrome in debug mode...
Waiting for connection from debug service on Chrome...             63.1s
DartUri: Cannot read packages spec: file:///usr/local/google/home/nanyu/projects/dart-pad/pkgs/dartpad_ui/.dart_tool/package_config.jsonError: PathNotFoundException: Cannot open file,
path = '/usr/local/google/home/nanyu/projects/dart-pad/pkgs/dartpad_ui/.dart_tool/package_config.json' (OS Error: No such file or directory, errno = 2)
This app is linked to the debug service: ws://127.0.0.1:37189/lIAEuWp3gn4=/ws
Debug service listening on ws://127.0.0.1:37189/lIAEuWp3gn4=/ws
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant