-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Description
Have 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 read the console error message carefully (if applicable).
Description
Summary
It appears that the text does not copy properly from this docusaurus warning message. The file which generates this message is packages/docusaurus/bin/beforeCli.mjs. This could be a non-docusaurus specific problem, but it does not appear to be a shell problem (I tried with zsh and bash).
I recently got this upgrade note, and wanted to upgrade my docusaurus version. I copy and pasted the command into my terminal, but the following happened:
(base) sanderschulhoff@Sanders-MacBook-Pro Learn_Prompting % npm i @docusaurus/core@latest @docusaurus/plugin-client-redirects@latest @docusaurus/plugin-google-analytics@latest │
│ @docusaurus/plugin-ideal-image@latest @docusaurus/preset-classic@latest @docusaurus/theme-mermaid@latest │
│ @docusaurus/module-type-aliases@latest
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "│" of package "│": Tags may not have any characters that encodeURIComponent encodes.
npm ERR! A complete log of this run can be found in: /Users/sanderschulhoff/.npm/_logs/2023-08-17T23_20_04_692Z-debug-0.log
zsh: command not found: │
zsh: command not found: │The | were quite weird as they didn't appear in the image I uploaded. I pasted the text elsewhere, and found that it pasted as:
npm i @docusaurus/core@latest @docusaurus/plugin-client-redirects@latest @docusaurus/plugin-google-analytics@latest │
│ @docusaurus/plugin-ideal-image@latest @docusaurus/preset-classic@latest @docusaurus/theme-mermaid@latest │
│ @docusaurus/module-type-aliases@latest
The terminal (a zsh shell) could not properly handle it. I asked GPT-4 to reformat it, and it gave me the following, which ran properly.
npm i @docusaurus/core@latest \
@docusaurus/plugin-client-redirects@latest \
@docusaurus/plugin-google-analytics@latest \
@docusaurus/plugin-ideal-image@latest \
@docusaurus/preset-classic@latest \
@docusaurus/theme-mermaid@latest \
@docusaurus/module-type-aliases@latest
Reproducible demo
No response
Steps to reproduce
- Run these individually:
npm install @docusaurus/core@2.4.0 @docusaurus/preset-classic@2.4.0
npx docusaurus --version
- Copy the command output (between the backticks):
- Paste the command into the terminal and attempt to run it.
Your environment
npx version: 9.7.2
node version: v20.4.0
VSCode, a bash or zsh terminal