Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions sources/corepackUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,11 @@
// Node.js segfaults when using npm@>=9.7.0 and v8-compile-cache
// $ docker run -it node:20.3.0-slim corepack npm@9.7.1 --version
// [SIGSEGV]
if (locator.name !== `npm` || semverLt(locator.reference, `9.7.0`))
// @ts-expect-error - No types
await import(`v8-compile-cache`);
if (locator.name !== `npm` || semverLt(locator.reference, `9.7.0`)) {
if (!Module.enableCompileCache?.())

Check failure on line 407 in sources/corepackUtils.ts

View workflow job for this annotation

GitHub Actions / Testing chores

Property 'enableCompileCache' does not exist on type 'typeof Module'.
// @ts-expect-error - No types
await import(`v8-compile-cache`);
}

// We load the binary into the current process,
// while making it think it was spawned.
Expand Down
Loading