docs: add workaround for missing peer dependencies ()

pull/886/head
Divyansh Singh 3 years ago committed by GitHub
parent 25a835f0f4
commit e15941f002
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -28,6 +28,39 @@ Add VitePress and Vue as dev dependencies for the project.
$ yarn add --dev vitepress vue
```
::: details Getting missing peer deps warnings?
`@docsearch/js` has certain issues with its peer dependencies. If you see some commands failing due to them, you can try this workaround for now:
On Yarn v2/v3, add this inside your rc file (`.yarnrc.yml` by default):
```yaml
packageExtensions:
'@docsearch/react@*':
peerDependenciesMeta:
'@types/react':
optional: true
'react':
optional: true
'react-dom':
optional: true
```
On PNPM, add this in your `package.json`:
```json
"pnpm": {
"peerDependencyRules": {
"ignoreMissing": [
"@types/react",
"react",
"react-dom"
]
}
}
```
:::
Create your first document.
```bash

Loading…
Cancel
Save