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

npm-to-yarn appears to fail when using 'npx' instead of 'npm' #7908

Closed
6 of 7 tasks
spenceradolph opened this issue Aug 7, 2022 · 2 comments
Closed
6 of 7 tasks

npm-to-yarn appears to fail when using 'npx' instead of 'npm' #7908

spenceradolph opened this issue Aug 7, 2022 · 2 comments
Labels
closed: working as intended This issue is intended behavior, there's no need to take any action. external This issue is caused by an external dependency and not Docusaurus.

Comments

@spenceradolph
Copy link

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

The problem is actively in the official docs here https://docusaurus.io/docs/installation#updating-your-docusaurus-version

On the line that says To check that the update occurred successfully, run:

The npm and yarn tabs are visible and usable, but clicking between them doesn't change the command below it.
This is likely an issue with the npm-to-yarn package being used, but perhaps this section could simply be re-worked to just avoid the issue entirely.

Reproducible demo

https://docusaurus.io/docs/installation#updating-your-docusaurus-version

Steps to reproduce

  1. Visit https://docusaurus.io/docs/installation#updating-your-docusaurus-version

Expected behavior

Expected tabs between yarn and npm to work correctly.

Actual behavior

The codeblock underneath the tabs stays on 'npx'

Your environment

  • n/a

Self-service

  • I'd be willing to fix this bug myself.
@spenceradolph spenceradolph added bug An error in the Docusaurus core causing instability or issues with its execution status: needs triage This issue has not been triaged by maintainers labels Aug 7, 2022
@spenceradolph
Copy link
Author

It might be that https://github.com/nebrelbug/npm-to-yarn is being used as a dependency inside https://github.com/facebook/docusaurus/tree/main/packages/docusaurus-remark-plugin-npm2yarn.

The npm-to-yarn repo owner has their profile info stating the following...

"I'm currently serving a 2-year mission for The Church of Jesus Christ of Latter-day Saints. During this time, I will not be working on any of my open-source projects."

@slorber indicated a possible fork in this unanswered discussion nebrelbug/npm-to-yarn#21 (comment)

@Josh-Cena Josh-Cena added closed: working as intended This issue is intended behavior, there's no need to take any action. external This issue is caused by an external dependency and not Docusaurus. and removed status: needs triage This issue has not been triaged by maintainers bug An error in the Docusaurus core causing instability or issues with its execution labels Aug 7, 2022
@Josh-Cena
Copy link
Collaborator

Yep—two issues:

  1. This is a dependency we don't control. It's being forked in fix(npm2yarn): use forked npm-to-yarn; fix a few conversion bugs #6005 but no news yet;
  2. Actually, there's no trivial replacement of npx in Yarn (especially in Yarn v1; see yarn equivalent of npx ? yarnpkg/yarn#3937). We are better off recommending npx to everyone—it works for both Yarn and npm!

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: working as intended This issue is intended behavior, there's no need to take any action. external This issue is caused by an external dependency and not Docusaurus.
Projects
None yet
Development

No branches or pull requests

2 participants