berry icon indicating copy to clipboard operation
berry copied to clipboard

[Bug?]: No migration troubleshooting docs for error `... isn't supported by any available resolver`

Open nettybun opened this issue 2 years ago • 8 comments

Self-service

  • [X] I'd be willing to implement a fix

Describe the bug

Hi I'm trying to update our repo from Yarn 1.22 to Yarn 3 and was following the migration guide: https://yarnpkg.com/getting-started/migration

This is the error I'm getting:

➤ YN0001: │ Error: @splunk/dashboard-utils@npm:25.1.0: @splunk/dashboard-utils@npm:25.1.0::__archiveUrl=https%3A%2F%2Frepo.splunk.com%2Fartifactory%2Fapi%2Fnpm%2Fnpm%2F%40splunk%2Fdashboard-utils%2F-%2F%40splunk%2Fdashboard-utils-25.1.0.tgz%23 isn't supported by any available resolver
    at Wf.getResolverByDescriptor (/repo/.yarn/releases/yarn-3.3.0.cjs:391:1647)
    at Wf.getCandidates (/repo/.yarn/releases/yarn-3.3.0.cjs:391:1235)
    at fQ.getCandidates (/repo/.yarn/releases/yarn-3.3.0.cjs:435:3324)
    at Wf.getCandidates (/repo/.yarn/releases/yarn-3.3.0.cjs:391:1264)
    at /repo/.yarn/releases/yarn-3.3.0.cjs:439:7695
    at Rf (/repo/.yarn/releases/yarn-3.3.0.cjs:390:8965)
    at ge (/repo/.yarn/releases/yarn-3.3.0.cjs:439:7675)
➤ YN0000: └ Completed in 2m 11s
➤ YN0000: Failed with errors in 2m 11s

I checked the https://yarnpkg.com/getting-started/migration#troubleshooting and searched GH issues for isn't supported by any available resolver but was unable to an existing issue.

Maybe https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/getting-started/migration.md could be updated with docs on how to debug/proceed when this happens?

This is a bug with documentation, since I see your issue template says Note that bugs without minimal reproductions will be closed as non-actionable. and I don't have a minimal repro case for the failed install; that's the problem. This is a failed migration of a private monorepo with 15 packages and 20000 lines of yarn.lock - I don't know where to start troubleshooting to be able to create a minimal repro case, and I think the docs could help with that. I understand that ideally you don't want users to need to do this, but it will be necessary to some people - there are a dozen teams at my company all using yarn-classic v1 because they've run until similar errors and given up. I think have good troubleshooting docs could help.

I'm willing to submit a docs PR if I can gather some troubleshooting steps that would help others. Right now my best guess is "Clone the yarn berry repo following CONTRIBUTING.MD, run yarn build:cli --no-minify, ...somehow attach that to a Node Debugger, set breakpoints, re-run the erroring yarn install again". Is this the right track? Thank you!

To reproduce

  • Follow the migration guide for a complex monorepo
  • Use a "node_modules"-based .yarnrc.yml:
    yarnPath: .yarn/releases/yarn-3.3.0.cjs
    npmRegistryServer: "https://repo.splunk.com/artifactory/api/npm/npm"
    nodeLinker: node-modules
    
  • Fail the migration
  • Check troubleshooting guide, GH issues, etc...
  • Reluctantly open an issue 😅

Environment

System:
    OS: macOS 12.6
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
  Binaries:
    Node: 16.14.0 - /private/var/folders/qv/pc1l_8w90b18nk2f5ljqf4hh0000gp/T/xfs-50824e24/node
    Yarn: 3.3.0 - /private/var/folders/qv/pc1l_8w90b18nk2f5ljqf4hh0000gp/T/xfs-50824e24/yarn
    npm: 8.3.1 - /usr/local/bin/npm
  npmPackages:
    jest: ^26.0.0 => 26.6.3

Additional context

No response

nettybun avatar Nov 22 '22 07:11 nettybun