Pub workspaces is a new feature that when used removes stray package_config.json from packages inside the workspace.
When trying to run license_checker on these packages one will get the following error:
Filtering out approved packages ...
Loading config from ../licenses_config.yaml ...
Checking all dependencies ...
No package_config.json found. Are you sure this is a Dart package directory?
To fix this one can navigate to the root pubspec.yaml an run the tool there.
This will check the licenses for all packages inside the workspace.
The root pubspec.yaml will look something like this:
name: _
publish_to: none
environment:
sdk: ^3.6.2
workspace:
- packages/helper
- packages/client_package
- packages/server_package
Maybe this explanation could be added to the README?
This could also be hinted at when using the tool inside a package that uses pub workspace.
Pub workspaces is a new feature that when used removes stray package_config.json from packages inside the workspace.
When trying to run
license_checkeron these packages one will get the following error:To fix this one can navigate to the root
pubspec.yamlan run the tool there.This will check the licenses for all packages inside the workspace.
The root
pubspec.yamlwill look something like this:Maybe this explanation could be added to the README?
This could also be hinted at when using the tool inside a package that uses pub workspace.