Open bkrausz opened 3 years ago
This issue reproduces on master:
Error: expect(received).resolves.toBeTruthy()
Received promise rejected instead of resolved
Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install
➤ YN0000: ┌ Resolution step
::group::Resolution step
➤ YN0001: │ Error: Assertion failed: Expected the resolution for react-dom@npm:^16.13.1 [9b2e5] to have been registered
at map (/github/workspace/packages/yarnpkg-core/sources/Project.ts:2036:21)
at Array.map (<anonymous>)
at resolvePeerDependenciesImpl (/github/workspace/packages/yarnpkg-core/sources/Project.ts:2030:56)
at resolvePeerDependencies (/github/workspace/packages/yarnpkg-core/sources/Project.ts:1807:20)
at applyVirtualResolutionMutations (/github/workspace/packages/yarnpkg-core/sources/Project.ts:2092:5)
at Project.resolveEverything (/github/workspace/packages/yarnpkg-core/sources/Project.ts:788:5)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at /github/workspace/packages/yarnpkg-core/sources/Project.ts:1370:7
at StreamReport.startTimerPromise (/github/workspace/packages/yarnpkg-core/sources/StreamReport.ts:309:14)
::endgroup::
➤ YN0000: └ Completed in 1s 182ms
➤ YN0000: Failed with errors in 1s 184ms
]
at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0c0da74930.zip/node_modules/expect/build/index.js:138:15)
at module.exports (evalmachine.<anonymous>:29:7)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
Describe the bug
When using module aliases in workspaces and a certain combination of dependencies, the following exception is being thrown:
Assertion failed: Expected the resolution for react-dom@npm:^16.13.1 [a3154] to have been registered
To Reproduce
See repro:
Reproduction
```js repro await packageJson({ name: 'package1', dependencies: { "react": "^16.13.1", "react-dom": "^16.13.1" }, }, { cwd: 'package1/' }) await packageJson({ name: 'package2', dependencies: { "react": "^16.13.1", "react-dom": "^16.13.1", "not-slate-react": "npm:slate-react@0.62.0", "slate-react": "0.62.0", }, }, { cwd: 'package2/' }) const installPromise = packageJsonAndInstall({ name: 'root', private: true, workspaces: [ 'package1/', 'package2/', ], }) await expect(installPromise).resolves.toBeTruthy() ```Additional context
This is unfortunately preventing our migration to Yarn 2.