Update contributing doc with trouble shooting section for swc (#31265)

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
This commit is contained in:
Jiachi Liu 2021-11-10 21:18:33 +01:00 committed by GitHub
parent edb5060fc0
commit 82c09bd500
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -164,7 +164,24 @@ There are two options to develop with your local version of the codebase:
yarn install --force
```
or
#### Troubleshooting
- If you see the below error while running `yarn dev` with next:
```
Failed to load SWC binary, see more info here: https://nextjs.org/docs/messages/failed-loadin
```
Try to add the below section to your `package.json`, then run again
```json
"optionalDependencies": {
"@next/swc-linux-x64-gnu": "canary",
"@next/swc-win32-x64-msvc": "canary",
"@next/swc-darwin-x64": "canary",
"@next/swc-darwin-arm64": "canary"
},
```
### Develop inside the monorepo