Skip to content

Commit 9a475fe

Browse files
committed
add troubleshooting
1 parent 337d97f commit 9a475fe

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.vitepress/config/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export const enConfig = defineLocaleConfig("root", {
149149
},
150150
{
151151
items: [
152+
{ text: "Troubleshooting", link: "/docs/guide/troubleshooting" },
152153
{ text: "All benchmarks", link: "/docs/guide/benchmarks" },
153154
{ text: "Projects using Oxc", link: "/docs/guide/projects" },
154155
{ text: "On media", link: "/docs/guide/media" },

src/docs/guide/troubleshooting.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Troubleshooting
2+
3+
## Cannot find native binding. npm has a bug related to optional dependencies
4+
5+
This is a npm (< v11.3.0) bug, things you can try:
6+
7+
- use latest npm
8+
- use pnpm
9+
- `rm -rf node_modules; npm i`
10+
- Install one of these bindings explicitly in your package.json because package manager is not picking up the optional dependency:
11+
12+
```
13+
@{app}/binding-win32-x64-msvc
14+
@{app}/binding-win32-arm64-msvc
15+
@{app}/binding-linux-x64-gnu
16+
@{app}/binding-linux-x64-musl
17+
@{app}/binding-freebsd-x64
18+
@{app}/binding-linux-arm64-gnu
19+
@{app}/binding-linux-arm64-musl
20+
@{app}/binding-linux-arm-gnueabihf
21+
@{app}/binding-linux-arm-musleabihf
22+
@{app}/binding-linux-s390x-gnu
23+
@{app}/binding-linux-riscv64-gnu
24+
@{app}/binding-darwin-x64
25+
@{app}/binding-darwin-arm64
26+
@{app}/binding-android-arm64
27+
@{app}/binding-wasm32-wasi
28+
```
29+
30+
where app is `oxlint`, `oxfmt`, `oxc-parser`, `oxc-transform`, `oxc-minify`, `oxc-resolver`

0 commit comments

Comments
 (0)