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]: yarn explain returns internal error, 404 because of Gatsby -> Docusaurus move #6249

Open
1 task done
simon-aira opened this issue Apr 25, 2024 · 4 comments · May be fixed by #6252
Open
1 task done

[Bug]: yarn explain returns internal error, 404 because of Gatsby -> Docusaurus move #6249

simon-aira opened this issue Apr 25, 2024 · 4 comments · May be fixed by #6252
Labels
bug Something isn't working

Comments

@simon-aira
Copy link

simon-aira commented Apr 25, 2024

Self-service

  • I'd be willing to implement a fix

Describe the bug

Example:

❯ yarn explain YN0000
Internal Error: The remote server failed to provide the requested resource
    at wb (/Users/simon/.cache/node/corepack/v1/yarn/4.1.1/yarn.js:147:31902)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Object.L4 (/Users/simon/.cache/node/corepack/v1/yarn/4.1.1/yarn.js:147:33665)
    at async j0t (/Users/simon/.cache/node/corepack/v1/yarn/4.1.1/yarn.js:435:359)
    at async Hh.execute (/Users/simon/.cache/node/corepack/v1/yarn/4.1.1/yarn.js:435:1134)
    at async Hh.validateAndExecute (/Users/simon/.cache/node/corepack/v1/yarn/4.1.1/yarn.js:94:787)
    at async as.run (/Users/simon/.cache/node/corepack/v1/yarn/4.1.1/yarn.js:98:3250)
    at async sSt (/Users/simon/.cache/node/corepack/v1/yarn/4.1.1/yarn.js:734:11303)
    at async nk (/Users/simon/.cache/node/corepack/v1/yarn/4.1.1/yarn.js:734:11659)

To reproduce

yarn explain YN0000

Environment

System:
    OS: macOS 14.4.1
    CPU: (10) arm64 Apple M2 Pro
  Binaries:
    Node: 20.12.2 - /private/var/folders/v6/x86jncgx39xf56z0zw_zfgp80000gn/T/xfs-261fb472/node
    Yarn: 4.1.1 - /private/var/folders/v6/x86jncgx39xf56z0zw_zfgp80000gn/T/xfs-261fb472/yarn
    npm: 10.6.0 - ~/Library/Caches/fnm_multishells/65652_1714072234497/bin/npm

Additional context

No response

@simon-aira simon-aira added the bug Something isn't working label Apr 25, 2024
@simon-aira
Copy link
Author

simon-aira commented Apr 27, 2024

It appears (see explain.ts line 19) to be trying to fetch the URL https://repo.yarnpkg.com/${version}/packages/gatsby/content/advanced/error-codes.md. Indeed, replacing 4.1.1 for version gives a 404 (here). Likewise, the help message when an error does not exists (explain.ts line 91) points to this file, but in the Github repo.

@simon-aira
Copy link
Author

simon-aira commented Apr 27, 2024

@arcanis
Copy link
Member

arcanis commented Apr 27, 2024

Oh good point, I didn't think about this command when we migrated from Gatsby to Docusaurus 🤔

Unfortunately we also recently changed from md to mdx, so there isn't a tagged url yet that works (it will only stop 404'ing after the next release). It should be:

https://repo.yarnpkg.com/${version}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx

@simon-aira
Copy link
Author

Ok! Would there also be other code changes required to support the format changes, or will updating the URL in the command be enough? As far as I can tell, not much MDX is used in this particular file?

@simon-aira simon-aira linked a pull request Apr 27, 2024 that will close this issue
3 tasks
@simon-aira simon-aira changed the title [Bug?]: yarn explain returns internal error [Bug]: yarn explain returns internal error, 404 because of Gatsby -> Docusaurus move Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants