Skip to content

Upgrade notification command does not copy properly due to box borders #9239

@trigaten

Description

@trigaten

Have you 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).

Screenshot 2023-08-17 at 4 24 24 PM

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

  1. Run these individually:
npm install @docusaurus/core@2.4.0 @docusaurus/preset-classic@2.4.0
npx docusaurus --version
  1. Copy the command output (between the backticks):
Screenshot 2023-08-17 at 4 39 05 PM
  1. Paste the command into the terminal and attempt to run it.

Your environment

Screenshot 2023-08-17 at 4 41 53 PM

npx version: 9.7.2
node version: v20.4.0

VSCode, a bash or zsh terminal

Self-service

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executiondomain: dxRelated to developer experience of working on Docusaurus sitesgood first issueIf you are just getting started with Docusaurus, this issue should be a good place to begin.status: accepting prThis issue has been accepted, and we are looking for community contributors to implement this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions