-
Notifications
You must be signed in to change notification settings - Fork 142
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
dependencySatisfies
fails due to empty package.json
#1332
Comments
Holy cow, after reading my own issue description, and double-checking that indeed the only change between passing and failing Embroider tests were unrelated dependency changes, I realized that that's not entirely true: I did add Now, after removing that again, and Still an underlying issue seems to exist... |
Seems this was another case of pnpm behaving wierdly in a monorepo when not using Closing in favour of #1349 and embroider-build/addon-blueprint#107 |
I have a v2 addon, that uses
ensure-safe-component
from@embroider/util
(which is still v1, we should change that I think?). While it used to work for a while, at some point it started to fail Embroider tests with this runtime error:This happened in this PR of an OSS project. It uses pnpm, and as said it used to work, and the only change from a passing CI job to a failing was the change of some dependencies related to ESLint (see https://github.com/CrowdStrike/ember-headless-form/pull/14/commits, commit
c094820
passing whilecb2b675
is failing), so nothing that could have a direct effect, other than maybe pnpm reshuffling things somehow.The cause of the error shown above is
dependencySatisfies
not getting the version ofember-source
here (the only version of ember-source innode_modules
is 4.10.0!). While debugging the@embroider/macros
babel transform you could see this:As you can see, the
.root
ofPackage
representing ember-source is somewhere in the temp build folder, and itspackage.json
only contains aname
property, noversion
, which obviously makes it returnundefined
for the version check ofdependencySatisfies
.@NullVoxPopuli pointed out that this type of almost empty
package.json
is likely generated by theEmptyPackageTree
broccoli plugin, utilized here. And indeed putting a breakpoint there showsember-source
being treated that way:Probably this could be "fixed" by migrating
embroider/util
to v2? But it still reveals an issue with a different root cause here, doesn't it? Maybe it occurred for the first time that a v2 addon depends on a v1 addon (util), that needs to have access to package versions viadependencySatisfies
? Still puzzling, how this has stopped working with some seemingly unrelated change (pnpm install
)The text was updated successfully, but these errors were encountered: