In work to convert our Ember apps to Embroider, I've come across an issue where the build errors with:
Some V1 ember addons are resolving as incorrect peer dependencies. This makes it impossible for us to safely convert them to v2 format.
despite having matching versions.
[email protected] -> @myOrg/[email protected]
sees peerDep [email protected]
at /path/to/monorepo/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]__@[email protected][email protected]/node_modules/ember-source
but [email protected] is using [email protected]
at /path/to/monorepo/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]__@glint+te_d57u3ixfkr4qimpfqyd7ephogm/node_modules/ember-source
You can see they are both resolving ember-source
at v4.12.4 however it doesn't connect them due to PNPM's structuring, having 2 copies in ./pnpm
. I have gone through all of the suggested resolutions in the Embroider docs and nothing works (delete lockfile & start over, auto-install-peers=false, dedupe).
This repo aims to be a reproduction of this issue.
- Run
pnpm install
to install all Node packages in repo. - Run
pnpm -r build-addon
to build the addons - Run
pnpm --filter my-app build-dev
to build the app using Embroider - Observe