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] Github tarball dependency specification isn't supported by any available resolver #885

Closed
1 task done
22a opened this issue Feb 3, 2020 · 13 comments · Fixed by #1321
Closed
1 task done
Labels
bug Something isn't working reproducible This issue can be successfully reproduced

Comments

@22a
Copy link
Contributor

22a commented Feb 3, 2020

  • I'd be willing to implement a fix

Description:
[email protected] errors with

➤ YN0001: │ Error: ember-cli-deploy-s3@https://github.com/ember-cli-deploy/ember-cli-deploy-s3/tarball/v1.3.0 isn't supported by any available resolver

when attempting to yarn install in a project which has https://github.com/ember-cli-deploy/ember-cli-deploy-s3/tarball/v1.3.0 as a dependency.

Perhaps the github pattern regex isn't catching this declaration correctly?

To Reproduce:

{
  "dependencies": {
    "ember-cli-deploy-s3": "https://github.com/ember-cli-deploy/ember-cli-deploy-s3/tarball/v1.3.0"
  }
}

Sherlock reproduction:

await expect(packageJsonAndInstall({
  dependencies: {
    [`ember-cli-deploy-s3`]: `https://github.com/ember-cli-deploy/ember-cli-deploy-s3/tarball/v1.3.0`,
  },
})).rejects.not.toThrow()

Screenshot:

Screenshot 2020-02-03 at 12 37 11

Environment:

  • OS: [macOS v10.15.3 (19D76)]
  • Node version [v10.15.0]
  • Yarn version [2.0.0-rc.28]
@22a 22a added the bug Something isn't working label Feb 3, 2020
@yarnbot yarnbot added the broken-repro The reproduction in this issue is broken label Feb 3, 2020
@yarnbot

This comment has been minimized.

@yarnbot

This comment has been minimized.

@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 Feb 3, 2020
@yarnbot
Copy link
Collaborator

yarnbot commented Feb 3, 2020

This issue reproduces on master:

Error: expect(received).rejects.not.toThrow()

Error name:    "Error"
Error message: "Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js install

➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: ember-cli-deploy-s3@https://github.com/ember-cli-deploy/ember-cli-deploy-s3/tarball/v1.3.0 isn't supported by any available resolver
    at MultiResolver.getResolverByDescriptor (/github/workspace/packages/yarnpkg-core/sources/MultiResolver.ts:67:13)
    at MultiResolver.getResolverByDescriptor [as bindDescriptor] (/github/workspace/packages/yarnpkg-core/sources/MultiResolver.ts:31:27)
    at bindDescriptor (/github/workspace/packages/yarnpkg-core/sources/Project.ts:717:34)
    at async Promise.all (index 0)
    at Project.resolveEverything (/github/workspace/packages/yarnpkg-core/sources/Project.ts:694:35)
    at /github/workspace/packages/yarnpkg-core/sources/Project.ts:1353:7
    at StreamReport.startTimerPromise (/github/workspace/packages/yarnpkg-core/sources/StreamReport.ts:159:14)
    at Project.install (/github/workspace/packages/yarnpkg-core/sources/Project.ts:1336:5)
    at /github/workspace/packages/plugin-essentials/sources/commands/install.ts:222:7
    at Function.start (/github/workspace/packages/yarnpkg-core/sources/StreamReport.ts:70:7)
➤ YN0000: └ Completed in 0.18s
➤ YN0000: Failed with errors in 0.18s
"

      65 | 
      66 |     if (!resolver)
    > 67 |       throw new Error(`${structUtils.prettyDescriptor(opts.project.configuration, descriptor)} isn't supported by any available resolver`);
         |             ^
      68 | 
      69 |     return resolver;
      70 |   }

      at MultiResolver.getResolverByDescriptor (../../github/workspace/packages/yarnpkg-core/sources/MultiResolver.ts:67:13)
      at MultiResolver.getResolverByDescriptor [as bindDescriptor] (../../github/workspace/packages/yarnpkg-core/sources/MultiResolver.ts:31:27)
      at bindDescriptor (../../github/workspace/packages/yarnpkg-core/sources/Project.ts:717:34)
          at async Promise.all (index 0)
      at Project.resolveEverything (../../github/workspace/packages/yarnpkg-core/sources/Project.ts:694:35)
      at ../../github/workspace/packages/yarnpkg-core/sources/Project.ts:1353:7
      at StreamReport.startTimerPromise (../../github/workspace/packages/yarnpkg-core/sources/StreamReport.ts:159:14)
      at Project.install (../../github/workspace/packages/yarnpkg-core/sources/Project.ts:1336:5)
      at ../../github/workspace/packages/plugin-essentials/sources/commands/install.ts:222:7
      at Function.start (../../github/workspace/packages/yarnpkg-core/sources/StreamReport.ts:70:7)
      ➤ YN0000: └ Completed in 0.18s
      ➤ YN0000: Failed with errors in 0.18s
    at Object.toThrow (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-2.zip/node_modules/expect/build/index.js:242:20)
    at module.exports (evalmachine.<anonymous>:6:17)
    at /github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-2.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:19
    at executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-2.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:22)
    at Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-2.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:18)
    at ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-1.0.38-d4f5e2dbf3-2.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-2.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-2.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-2.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)

@redblue9771
Copy link

➜  operator-mono-lig git:(master) ✗ yarn add xpath    
➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: [email protected]:%3A__archiveUrl=https%3A//registry.npm.taobao.org/xpath/download/xpath-0.0.27.tgz isn't supported by any available resolver
    at t.MultiResolver.getResolverByDescriptor (/usr/lib/node_modules/yarn/bin/yarn.js:24:41628)
    at t.MultiResolver.bindDescriptor (/usr/lib/node_modules/yarn/bin/yarn.js:24:41082)
    at t.OverrideResolver.bindDescriptor (/usr/lib/node_modules/yarn/bin/yarn.js:36:862333)
    at /usr/lib/node_modules/yarn/bin/yarn.js:36:583324
    at async Promise.all (index 0)
    at async N.resolveEverything (/usr/lib/node_modules/yarn/bin/yarn.js:36:582677)
    at async /usr/lib/node_modules/yarn/bin/yarn.js:36:599416
    at async l.startTimerPromise (/usr/lib/node_modules/yarn/bin/yarn.js:24:45528)
    at async N.install (/usr/lib/node_modules/yarn/bin/yarn.js:36:599028)
    at async /usr/lib/node_modules/yarn/bin/yarn.js:50:77074
➤ YN0000: └ Completed in 0.06s
➤ YN0000: Failed with errors in 0.06s

@armarti
Copy link

armarti commented Feb 27, 2020

Same with [email protected], caused by [email protected] > [email protected] > [email protected] > esprima-fb@~3001.0001.0000-dev-harmony-fb:

➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: esprima-fb@~3001.0001.0000-dev-harmony-fb isn't supported by any available resolver
    at MultiResolver.getResolverByDescriptor (/Users/me/Projects/my-project/.yarn/releases/yarn-sources.js:56927:31)
    at MultiResolver.bindDescriptor (/Users/me/Projects/my-project/.yarn/releases/yarn-sources.js:56899:43)
    at /Users/me/Projects/my-project/.yarn/releases/yarn-sources.js:64584:56
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 544)
    at async Project.resolveEverything (/Users/me/Projects/my-project/.yarn/releases/yarn-sources.js:64567:54)
    at async /Users/me/Projects/my-project/.yarn/releases/yarn-sources.js:65146:25
    at async StreamReport.startTimerPromise (/Users/me/Projects/my-project/.yarn/releases/yarn-sources.js:57597:32)
    at async Project.install (/Users/me/Projects/my-project/.yarn/releases/yarn-sources.js:65129:21)
➤ YN0000: └ Completed in 1.23s
➤ YN0000: Failed with errors in 1.24s

Same result when setting yarn version from sources at a85b342 and when setting yarn version normally to 2.0.0-rc.29.

@steflen
Copy link

steflen commented Apr 18, 2020

❱ yarn install
➤ YN0000: ┌ Resolution step
➤ \YN0001: │ Error: cli-table@https://github.com/telerik/cli-table/tarball/v0.3.1.2 isn't supported by any available resolver

@gund
Copy link

gund commented Apr 24, 2020

I'm having same issue:

$ yarn
➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: jquery-extendext@git+https://[email protected]/mistic100/jQuery.extendext#0.1.1 isn't supported by any available resolver
    at t.MultiResolver.getResolverByDescriptor (/PATH/.yarn/releases/yarn-2.0.0-rc.32.js:16:49340)

Having dependency like so:

"dependencies": {
    "jquery-extendext": "git+https://[email protected]/mistic100/jQuery.extendext#0.1.1"
}

Unfortunately, this issue renders Yarn berry pretty useless at this point....

@deini
Copy link
Member

deini commented Apr 24, 2020

@gund You can use one of the many supported formats. The closer to the one you are trying to use would be:

"dependencies": {
    "jquery-extendext": "git+ssh://[email protected]/mistic100/jQuery.extendext#0.1.1"
}

You can find other valid formats here.

A few of them might not work because the github username has a number, a PR to fix that is already open tho #1220

@gund
Copy link

gund commented Apr 24, 2020

@deini thanks for your response!

I've tried as you suggested but then got another error: Listing the refs for git+ssh://[email protected]/mistic100/jQuery.extendext.git failed

yarn        
➤ YN0000: ┌ Resolution step
➤ YN0001: │ Error: jquery-extendext@git+ssh://[email protected]/mistic100/jQuery.extendext.git#0.1.1: Listing the refs for git+ssh://[email protected]/mistic100/jQuery.extendext.git failed
    at ChildProcess.<anonymous> (/PATH/.yarn/releases/yarn-2.0.0-rc.32.js:10:389744)

Do you know what is it about and how to fix it?

@deini
Copy link
Member

deini commented Apr 24, 2020

@gund np! It's working for me 🤔, maybe you don't have your github setup with ssh keys. You can also try:

"dependencies": {
    "jquery-extendext": "https://github.com/mistic100/jQuery.extendext#0.1.1"
}

@gund
Copy link

gund commented Apr 24, 2020

@deini yeah I actually tried with https://github.com/mistic100/jQuery.extendext.git#0.1.1 and it moved past that point and started to download archives.

However I've got later another error after all packages got downloaded: ➤ YN0001: │ Error: typescript@patch:typescript@npm%3A3.6.4#builtin<compat/typescript>::version=3.6.4&hash=c79188: Cannot apply hunk #5

It seems a bit off-topic but I was able to fix it by adding to my package.json next lines (found in this issue):

  "resolutions": {
    "typescript": "3.7.5"
  }

Now Yarn v2 finally installed dependencies! Yay!

@paul-soporan
Copy link
Member

@redblue9771, @armarti, @gund Your problems aren't related to this issue (Which is specifically about the GitHub /tarball/ URLs) and each one of them is different. Please open a new issue for each one of your problems.

arcanis pushed a commit that referenced this issue May 11, 2020
* feat(plugin-git): add support for github tarball urls

Fixes #885.

* chore(release-workflow): set releases

* test(plugin-git): add tarball pattern and update snapshots
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

Successfully merging a pull request may close this issue.

7 participants