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

docs: add troubleshooting steps to migration/upgrade page #9490

Merged
merged 10 commits into from
Apr 18, 2024

Conversation

homotechsual
Copy link
Contributor

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

Test Plan

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/

Related issues/PRs

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 1, 2023
@homotechsual homotechsual changed the title add troubleshooting steps to migration/upgrade page docs: add troubleshooting steps to migration/upgrade page Nov 1, 2023
Copy link

netlify bot commented Nov 1, 2023

[V2]

Name Link
🔨 Latest commit f0bccf6
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/660ff8999cf289000837f8bd
😎 Deploy Preview https://deploy-preview-9490--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

github-actions bot commented Nov 1, 2023

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🔴 41 🟢 98 🟢 96 🟢 100 🟠 88 Report
/docs/installation 🟠 51 🟢 96 🟢 100 🟢 100 🟠 88 Report
/docs/category/getting-started 🟠 75 🟢 100 🟢 100 🟢 90 🟠 88 Report
/blog 🟠 70 🟢 100 🟢 100 🟢 90 🟠 88 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 61 🟢 96 🟢 100 🟢 100 🟠 88 Report
/blog/tags/release 🟠 68 🟢 100 🟢 100 🟠 80 🟠 88 Report
/blog/tags 🟠 76 🟢 100 🟢 100 🟢 90 🟠 88 Report

@homotechsual
Copy link
Contributor Author

Not sure if the lint failure is related.

@homotechsual
Copy link
Contributor Author

Interesting @Josh-Cena is the newline still required for v3 or is that specific for docusaurus.io (because of the linting rules?)

Comment on lines +41 to +43
```powershell
@('node_modules','yarn.lock','package-lock.json') | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't find it necessary to document powershell—https://docusaurus.io/docs/i18n/tutorial#translate-the-docs here we don't. Particularly for simple commands like this that can even be done through the file UI, let's keep things simple.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the primary scripting language of a vast swathe of Docusaurus users who're using Windows, I feel it's helpful to have those examples where they make sense - which they don't in all cases but happy for it not to be included if that's the concensus

Copy link
Contributor

@armano2 armano2 Mar 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 rm -r node_modules
 rm -r yarn.lock
 rm -r package-lock.json

should work fine with new versions of powershell

PS D:\Projects\docusaurus> rm -r node_modules
PS D:\Projects\docusaurus> rm -r yarn.lock
PS D:\Projects\docusaurus> rm -r package-lock.json
Remove-Item: Cannot find path 'D:\Projects\docusaurus\package-lock.json' because it does not exist.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to know thanks. Is this really new or most Windows users have it supported?

@homotechsual can you confirm it works for you with rm -rf? if yes I'd rather remove those tabs before merging

Copy link
Contributor

@armano2 armano2 Apr 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be supported in most of win 10-11 and in and potentially in older versions of windows if user uses powershell

rm is just a shortcut for Remove-Item

PS D:\> 'rm', 'rmdir', 'rd' | Get-Command

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           rm -> Remove-Item
Alias           rmdir -> Remove-Item
Alias           rd -> Remove-Item

-rf s alittle tricker but if you really want to have f like behaviour you want to use something like rm -r -fo node_modules, but that should not be necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rm works - but the switches don't translate 1-1 on any version of Windows or PowerShell which is why the separate command is needed. You could do rm -r -fo for Windows but then really you still have a different command - but you're just making it needlessly confusing by using an aliased version of the full command I included.

If you guys don't think it needs to be included I get it - I can remove it. I'm just seeing more frequent questions from devs on Windows and all our command examples are linux only. I'm more than happy to widen this effort so it's consistent where it makes sense in a similar method to how we handle providing npm yarn and pnpm examples.

@Josh-Cena
Copy link
Collaborator

Interesting @Josh-Cena is the newline still required for v3 or is that specific for docusaurus.io (because of the linting rules?)

I don't think it's necessary, but it's aesthetically more pleasing to me. If you think it's worthwhile to add for testing purposes, feel free to remove them.

@homotechsual
Copy link
Contributor Author

Interesting @Josh-Cena is the newline still required for v3 or is that specific for docusaurus.io (because of the linting rules?)

I don't think it's necessary, but it's aesthetically more pleasing to me. If you think it's worthwhile to add for testing purposes, feel free to remove them.

Nah, I agree on the aesthetics - I might PR a test into dogfooding 👍

@slorber slorber added the pr: documentation This PR works on the website or other text documents in the repo. label Dec 1, 2023
Copy link
Collaborator

@slorber slorber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test

@slorber
Copy link
Collaborator

slorber commented Apr 18, 2024

THanks, I guess that's fine and will not harm much to have this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA pr: documentation This PR works on the website or other text documents in the repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants