Closed nicolo-ribaudo closed 11 months ago
We couldn't reproduce your issue (all the assertions passed on master).
This issue reproduces on master:
Error: expect(received).resolves.not.toThrow()
Received promise rejected instead of resolved
Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install
➤ YN0000: · Yarn 4.0.1-dev
➤ YN0000: ┌ Resolution step
::group::Resolution step
➤ YN0001: │ Error: acorn@https://gitpkg.now.sh/acornjs/acorn/acorn?[...] isn't supported by any available resolver
at MultiResolver.getResolverByDescriptor (/github/workspace/packages/yarnpkg-core/sources/MultiResolver.ts:73:13)
at MultiResolver.bindDescriptor (/github/workspace/packages/yarnpkg-core/sources/MultiResolver.ts:31:27)
at Project.preparePackage (/github/workspace/packages/yarnpkg-core/sources/Project.ts:737:30)
at startPackageResolution (/github/workspace/packages/yarnpkg-core/sources/Project.ts:834:21)
at async Promise.allSettled (index 0)
at Object.allSettledSafe (/github/workspace/packages/yarnpkg-core/sources/miscUtils.ts:89:19)
at <anonymous> (/github/workspace/packages/yarnpkg-core/sources/Project.ts:939:9)
at StreamReport.startProgressPromise (/github/workspace/packages/yarnpkg-core/sources/Report.ts:167:14)
at Project.resolveEverything (/github/workspace/packages/yarnpkg-core/sources/Project.ts:816:5)
at <anonymous> (/github/workspace/packages/yarnpkg-core/sources/Project.ts:1775:7)
::endgroup::
➤ YN0001: Error: acorn@https://gitpkg.now.sh/acornjs/acorn/acorn?[...] isn't supported by any available resolver
at MultiResolver.getResolverByDescriptor (/github/workspace/packages/yarnpkg-core/sources/MultiResolver.ts:73:13)
at MultiResolver.bindDescriptor (/github/workspace/packages/yarnpkg-core/sources/MultiResolver.ts:31:27)
at Project.preparePackage (/github/workspace/packages/yarnpkg-core/sources/Project.ts:737:30)
at startPackageResolution (/github/workspace/packages/yarnpkg-core/sources/Project.ts:834:21)
at async Promise.allSettled (index 0)
at Object.allSettledSafe (/github/workspace/packages/yarnpkg-core/sources/miscUtils.ts:89:19)
at <anonymous> (/github/workspace/packages/yarnpkg-core/sources/Project.ts:939:9)
at StreamReport.startProgressPromise (/github/workspace/packages/yarnpkg-core/sources/Report.ts:167:14)
at Project.resolveEverything (/github/workspace/packages/yarnpkg-core/sources/Project.ts:816:5)
at <anonymous> (/github/workspace/packages/yarnpkg-core/sources/Project.ts:1775:7)
➤ YN0000: └ Completed
➤ YN0000: · Failed with errors in 0s 114ms
]
at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-9b3e8262b0.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.3-558f52b79f-69609f7d06.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:57:19
at executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-69609f7d06.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:18:22)
at executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-69609f7d06.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:25:18)
at ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.3-558f52b79f-69609f7d06.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:26:76)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-312910c71e.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-312910c71e.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-312910c71e.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
Duplicate of #2437, although this other thread is closed. We probably should improve the situation somehow.
Will be fixed with https://github.com/yarnpkg/berry/pull/5931
Self-service
Describe the bug
I am trying to add this tgz as a dependency: https://gitpkg.now.sh/acornjs/acorn/acorn?c3ec7023f08bdd6c4eee0bf76bfa2e0b88af8e4a
However, Yarn throws an error:
I also tried to remove the query parameter, and it still throws:
For the case without the query parameter, I can add
#.tgz
at the end of the URL. This is meaningless (it's just a URL hash that the server ignores), but it makes Yarn happy: https://gitpkg.now.sh/acornjs/acorn/acorn#.tgzHowever, this hack does not work when there is a query parameter (https://gitpkg.now.sh/acornjs/acorn/acorn?c3ec7023f08bdd6c4eee0bf76bfa2e0b88af8e4a#.tgz).
To reproduce
Environment
Additional context
Regardless of the query parameter, URLs extensions are meaningless. I could serve a JS file at
http://example.com/foo.tar
, or a tarball athttp://example.com/foo.js
. On the web, the file type is described by the mime type in the HTTP response and not by the "extension".