-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site configuration. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Not sure if the lint failure is related. |
Interesting @Josh-Cena is the newline still required for v3 or is that specific for docusaurus.io (because of the linting rules?) |
```powershell | ||
@('node_modules','yarn.lock','package-lock.json') | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue | ||
``` |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test
THanks, I guess that's fine and will not harm much to have this |
Pre-flight checklist
Motivation
Test Plan
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs