[npm2yarn]: `npm init` => `yarn create`
See original GitHub issueHave you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Prerequisites
- I’m using the latest version of Docusaurus.
- I have tried the
npm run clearoryarn clearcommand. - I have tried
rm -rf node_modules yarn.lock package-lock.jsonand 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
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
- create a standard docusarus page
- add
@docusaurus/remark-plugin-npm2yarnplugin - 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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
yarn init
Interactively creates or updates a package.json file. yarn init. This command walks you through an interactive session to create a package.json file.
Read more >npm2yarn - npm
A command-line tool for converting projects that use `npm`, [`npm-shrinkwrap`](https://www.npmjs.com/package/npm-shrinkwrap) (Uber's package ...
Read more >@docusaurus/remark-plugin-npm2yarn - npm package | Snyk
Remark plugin for converting npm commands to Yarn commands as tabs. For more information about how to use this package see README.
Read more >npm:npm2yarn | Skypack
A command-line tool for converting projects that use npm, npm-shrinkwrap (Uber's package for shrinkwrapping), and/or npm-shrinkwrap-check to Yarn.
Read more >NPM vs Yarn Cheat Sheet - Red Shift - Infinite Red
Okay, so you've heard about this new JavaScript package manager called yarn, installed it with npm i -g yarn, and now you want...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

We are aware of this: https://github.com/facebook/docusaurus/pull/5635#issuecomment-937806707
However, we use a 3rd party dep under the hood which is currently unmaintained. I’m discussing with others about what’s the best option. I would prefer forking
npm2yarnconsidering it’s quite lightweight.Thanks 👍
Will maintain the fork under my own name (easier to transfer later to a potential docusaurus-core org that I’m asking for) and publish under
@docusaurusorg (also a security concern).