From e43579620f3278fae1ac00b8db024912ca61a4c1 Mon Sep 17 00:00:00 2001 From: Segev Finer Date: Wed, 3 Jan 2024 09:38:16 +0200 Subject: [PATCH] fix: over extracting native modules with pnpm (#14) --- prelude/bootstrap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prelude/bootstrap.js b/prelude/bootstrap.js index 4b6e19f83..36aa2a4d1 100644 --- a/prelude/bootstrap.js +++ b/prelude/bootstrap.js @@ -2217,7 +2217,7 @@ function payloadFileSync(pointer) { // Example: moduleFolder = /snapshot/appname/node_modules/sharp/build/Release const parts = moduleFolder.split(path.sep); - const mIndex = parts.indexOf('node_modules') + 1; + const mIndex = parts.lastIndexOf('node_modules') + 1; let newPath;