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

Docusaurus can't be initialized with pnpm #5182

Closed
2 of 5 tasks
3x071c opened this issue Jul 15, 2021 · 2 comments
Closed
2 of 5 tasks

Docusaurus can't be initialized with pnpm #5182

3x071c opened this issue Jul 15, 2021 · 2 comments
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs more information There is not enough information to take action on the issue.

Comments

@3x071c
Copy link

3x071c commented Jul 15, 2021

🐛 Bug Report

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

Attempting to initialize a new docusaurus project fails with Excess arguments when using pnpx:

$ pnpx -y @docusaurus/init@latest init my-website classic
Packages: +39
+++++++++++++++++++++++++++++++++++++++
Packages are cloned from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/<user>/.pnpm-store/v3
  Virtual store is at:             node_modules/.pnpm

/home/<user>/.pnpm-store/v3/tmp/_npx/50290/5:
+ @docusaurus/init 2.0.0-beta.3

Progress: resolved 39, reused 39, downloaded 0, added 39, done
Excess arguments.

npx works, as well as installing and using docusaurus with pnpm afterwards:

$ npx -y @docusaurus/init@latest init my-website classic --skip-install && cd my-website && pnpm i

pnpx belongs to pnpm, a relatively new package manager which avoids dependency trouble and high disk space usage by using hard links from a global store and not flattening node_modules. While I was able to work around this so easily it's almost not worth an issue (as seen above), it would be nice if docusaurus would be smooth to initialize for pnpm users as well.

Have you read the Contributing Guidelines on issues?

Yes

Steps to reproduce

  1. Install pnpm: npm i -g pnpm
  2. Follow instructions with pnpx: pnpx -y @docusaurus/init@latest init my-website classic

Expected behavior

  1. Success :)

Actual behavior

  1. Fail: Excess arguments :(

Your environment

  • Public source code: -
  • Public site URL: -
  • Docusaurus version used: 2.0.0-beta.3
  • Environment name and version: Node.js 16.5.0
  • Operating system and version: Arch GNU/Linux (rolling release)

Reproducible demo

N/A

@3x071c 3x071c 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 Jul 15, 2021
@slorber
Copy link
Collaborator

slorber commented Jul 15, 2021

Is it 100% sure it's a Docusaurus bug?

Have you checked pnpm repo for issues? There are a few that looks related:
https://github.com/pnpm/pnpm/search?q=content-addressable&type=issues

If so, what's the usual way for making a package initializable with pnpm, that diverge from the other tools?

Are you sure your init command is correct and another syntax is not required for extra cli args with pnpx?

@3x071c
Copy link
Author

3x071c commented Jul 16, 2021

Don't really have time to look into this rn, sorry...

@3x071c 3x071c closed this as completed Jul 16, 2021
@Josh-Cena Josh-Cena removed the status: needs triage This issue has not been triaged by maintainers label Feb 22, 2022
@Josh-Cena Josh-Cena reopened this Feb 22, 2022
@Josh-Cena Josh-Cena added the status: needs more information There is not enough information to take action on the issue. label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error in the Docusaurus core causing instability or issues with its execution status: needs more information There is not enough information to take action on the issue.
Projects
None yet
Development

No branches or pull requests

3 participants