Description
the effects of this bug are that fastboot cannot be used in conjunction with more recent versions of yarn, pnpm, or pnp strategies that avoid hoisting dependencies to root.
This affects resolution of whitelisted dependencies both from the project and from addons it consumes.
For instance, ember-fetch declares both a dependency
and whitelistes abortcontroller-polyfill
. Even if the consuming app also adds abortcontroller-polyfill
to its dependencies and adds the same whitelisted values, when hoisting does not occur this will fail to be resolved by the sandboxedRequire provided by fastboot-schema.js which scopes to a directory that will not be able to see it and executes from a directory that does not have the parent project in its path.
Example failure of this in which the parent project has re-declared the dependency and re-declared the whitelisted values:
Error: Cannot find module 'abortcontroller-polyfill/dist/cjs-ponyfill'
Require stack:
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/fastboot/src/fastboot-schema.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/fastboot/src/ember-app.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/fastboot/src/index.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected][email protected]/node_modules/ember-cli-fastboot-testing/lib/helpers.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected][email protected]/node_modules/ember-cli-fastboot-testing/index.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/models/package-info-cache/package-info.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/models/package-info-cache/index.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/models/project.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/utilities/get-config.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/utilities/instrumentation.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/ember-cli/lib/cli/index.js
- /Users/cthoburn/github/data/node_modules/.pnpm/[email protected]/node_modules/ember-cli/bin/ember