Open nickbreen opened 2 years ago
We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.
The labels on this github issue will be updated when the story is started.
A work-around is to use project-roots --recursive
and use the output to generate the command line for report --prepare --aggregate-paths ...
which treats each path as a discrete project.
Also even if the 'production' prefix for the yarn install
command is empty the yarn install
command will fail also due to there being no root-project/workspace.
Hey @nickbreen ! Thanks for raising this. There seems to be two issues here. One is the prepare command not working when there is no root project. And the other is about silent failing when you would prefer it to actually error out. Do you have proposed solutions for this? The failing out is easy enough but Im wondering if you paths work around for the other issue is good enough? We welcome any PRs if you have an idea for this :)
Command line:
report --prepare --recursive --enabled-package-managers yarn
In our monorepo we have a number of independent yarn projects each with their own
package.json
andyarn.lock
file, we have no rootpackage.json
/yarn.lock
and we're not using workspaces.License finder logs:
But finds no dependencies or licenses!
Inspection of yarn.rb shows the prepare command executed is:
When run manually that command fails on the first command
yarn plugin import
with:Due to there being no root-project.
Problem 1 is that this error is silent. Even with
--debug
enabled there is no indication that the command has failed, the report is 'successfully' generated with zero dependencies and the tool exits with a zero exit code indicating success.Problem 2 is that license finder is capable of finding the yarn projects but then fails to execute against the found project.