mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-01 19:27:48 +02:00
docs: add troubleshooting steps to migration/upgrade page (#9490)
Co-authored-by: Joshua Chen <sidachen2003@gmail.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com> Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
This commit is contained in:
parent
8e084ef8ba
commit
edb695b9aa
2 changed files with 40 additions and 1 deletions
|
@ -11,3 +11,42 @@ Docusaurus versioning is based on the `major.minor.patch` scheme and respects [*
|
||||||
import DocCardList from '@theme/DocCardList';
|
import DocCardList from '@theme/DocCardList';
|
||||||
|
|
||||||
<DocCardList />
|
<DocCardList />
|
||||||
|
|
||||||
|
## Troubleshooting upgrades
|
||||||
|
|
||||||
|
When upgrading Docusaurus you may experience issues caused by mismatching cached dependencies - there are a few troubleshooting steps you should perform to resolve these common issues before reporting a bug or seeking support.
|
||||||
|
|
||||||
|
### Run the `clear` command
|
||||||
|
|
||||||
|
This CLI command is used to clear a Docusaurus site's generated assets, caches and build artifacts.
|
||||||
|
|
||||||
|
```bash npm2yarn
|
||||||
|
npm run clear
|
||||||
|
```
|
||||||
|
|
||||||
|
### Remove `node_modules` and your lock file(s)
|
||||||
|
|
||||||
|
Remove the `node_modules` folder and your package manager's lock file using the following:
|
||||||
|
|
||||||
|
<Tabs>
|
||||||
|
<TabItem label="Bash" value="bash">
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rm -rf node_modules yarn.lock package-lock.json
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem label="PowerShell" value="powershell">
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
@('node_modules','yarn.lock','package-lock.json') | Remove-Item -Force -Recurse -ErrorAction SilentlyContinue
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
Then reinstall packages and regenerate the `lock` file using:
|
||||||
|
|
||||||
|
```bash npm2yarn
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
import npm2yarn from '@docusaurus/remark-plugin-npm2yarn';
|
import npm2yarn from '@docusaurus/remark-plugin-npm2yarn';
|
||||||
import remarkMath from 'remark-math';
|
import remarkMath from 'remark-math';
|
||||||
import rehypeKatex from 'rehype-katex';
|
import rehypeKatex from 'rehype-katex';
|
||||||
|
@ -523,6 +522,7 @@ export default async function createConfigAsync() {
|
||||||
'haskell',
|
'haskell',
|
||||||
'matlab',
|
'matlab',
|
||||||
'PHp',
|
'PHp',
|
||||||
|
'powershell',
|
||||||
'bash',
|
'bash',
|
||||||
'diff',
|
'diff',
|
||||||
'json',
|
'json',
|
||||||
|
|
Loading…
Add table
Reference in a new issue