Skip to content

[npm2yarn]: npm init => yarn create #5861

@christian-bromann

Description

@christian-bromann

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

See demo here: https://du0ui.sse.codesandbox.io/docs/intro

If you use @docusaurus/remark-plugin-npm2yarn and your code snippet is set like this:

```sh npm2yarn
npm init wdio ./foo
```

I would expect that it would transform the yarn version to yarn create wdio ./foo.

Steps to reproduce

  1. create a standard docusarus page
  2. add @docusaurus/remark-plugin-npm2yarn plugin
  3. add example as mention above

Expected behavior

I would expect that it would transform the yarn version to yarn create wdio ./foo.

Actual behavior

It displays npm init wdio ./foo and yarn init wdio ./foo which results in the attempt of creating a new yarn package rather than running the create-wdio starter package.

Your environment

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

Reproducible demo

https://codesandbox.io/s/nice-fire-du0ui?file=/docusaurus.config.js

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 executionexternalThis issue is caused by an external dependency and not Docusaurus.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions