You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-1Lines changed: 33 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,7 +93,39 @@ Memory comparison between standard Node.js 22 and pointer-compressed Node.js 25
93
93
|`@napi-rs/uuid`| Rust N-API | ✓ Works |
94
94
|`@node-rs/argon2`| Rust N-API | ✓ Works |
95
95
96
-
**Non-N-API native addons may crash.** Addons using the older V8 native addon API (like `better-sqlite3`) are not compatible with pointer compression and will segfault. Always prefer N-API-based alternatives.
96
+
**Non-N-API native addons may crash.** Addons using the older V8 native addon API (like `better-sqlite3`) are not compatible with pointer compression and can segfault. Packages that rely on `nan` are especially affected. Always prefer N-API-based alternatives.
97
+
98
+
### Workarounds for Non-N-API Addons
99
+
100
+
If your dependency uses `nan` and does not provide binaries built for this runtime, you must force a local rebuild of its native addon.
101
+
102
+
If the package in `node_modules` still contains source files, try a normal rebuild:
103
+
104
+
```bash
105
+
cd node_modules/<package-name>
106
+
pnpm install --ignore-scripts
107
+
pnpm run rebuild
108
+
```
109
+
110
+
Some packages on npm do not ship source files needed to rebuild. In these cases, you may need to fetch the source from the git repository, copy it back into `node_modules`, and run a manual rebuild.
111
+
112
+
#### Known affected package example
113
+
114
+
##### `@datadog/pprof`
115
+
116
+
This was tested against [@datadog/pprof](https://www.npmjs.com/package/@datadog/pprof) 5.13.5.
0 commit comments