Skip to content

npm2yarn "couldn't auto-convert command" error message #8732

Description

@brianlagunas

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

When using the npm2yarn plugin, if you specify the shorthand command npm start, the plugin will display an error # couldn't auto-convert command when the Yarn tab is selected.

image

image

If you provide the full command npm run start then there are no errors displayed in the Yarn tab.

image

image

Reproducible demo

https://stackblitz.com/edit/github-7sb7wc?file=docs%2Fintro.md

Steps to reproduce

  1. Run the stackblitz repro
  2. Click the "Docusaurus Tutorial - 5min" button to be taken to the "./docs/intro.md"
  3. Overserve the npm2yarn code blocks.

Expected behavior

I expected the Yarn tab to properly display yarn start with no errors

image

Actual behavior

An error is displayed # couldn't auto-convert command

image

Your environment

  • Public source code: see stackblitz
  • Public site URL: see stackblitz
  • Docusaurus version used: 2.3.1
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node.js 18.13.0
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionclosed: wontfixA fix will bring significant overhead, or is out of scope (for feature requests)

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions