Skip to content
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

[Bug?]: Alias resolution isn't working for package #3060

Closed
1 task
rhlsthrm opened this issue Jun 29, 2021 · 4 comments
Closed
1 task

[Bug?]: Alias resolution isn't working for package #3060

rhlsthrm opened this issue Jun 29, 2021 · 4 comments
Labels
bug Something isn't working reproducible This issue can be successfully reproduced

Comments

@rhlsthrm
Copy link

rhlsthrm commented Jun 29, 2021

Self-service

  • I'd be willing to implement a fix

Describe the bug

I have a package alias that worked with Yarn v1 and NPM. When I try to update to Yarn v2, I get this error:

➤ YN0016: │ @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers: Registry failed to return tag "hardhat-deploy-ethers"

To reproduce

await expect(packageJsonAndInstall({
  devDependencies: {"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers"},
})).resolves.toBeTruthy();

Environment

System:
OS: macOS 11.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 14.16.0 - /private/var/folders/0x/cml8jk85195dd8p2f1swfrb00000gn/T/xfs-6b93a8b0/node
Yarn: 2.4.2 - /private/var/folders/0x/cml8jk85195dd8p2f1swfrb00000gn/T/xfs-6b93a8b0/yarn
npm: 6.14.11 - /usr/local/opt/node@14/bin/npm

Additional context

Repro by running:
yarn add -D @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers

I can successfully run:
npm install --save-dev @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers

@rhlsthrm rhlsthrm added the bug Something isn't working label Jun 29, 2021
@yarnbot yarnbot added the broken-repro The reproduction in this issue is broken label Jun 29, 2021
@yarnbot

This comment has been minimized.

@yarnbot yarnbot added reproducible This issue can be successfully reproduced and removed broken-repro The reproduction in this issue is broken labels Jun 29, 2021
@yarnbot

This comment has been minimized.

@yarnbot
Copy link
Collaborator

yarnbot commented Jun 29, 2021

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
➤ YN0016: │ @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers: Registry failed to return tag "hardhat-deploy-ethers"
::endgroup::
➤ YN0000: └ Completed
➤ YN0000: Failed with errors in 0s 186ms
]
    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>:2:7)
    at /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:19
    at executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:22)
    at Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:18)
    at ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:59)
    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)

@paul-soporan
Copy link
Member

Duplicate of #1816.

You need to specify a range until the issue is fixed: yarn add -D @nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers@*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproducible This issue can be successfully reproduced
Projects
None yet
Development

No branches or pull requests

3 participants