Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Commit 3554b11

Browse files
authored
Give descriptive error message when ldd doesn't find a dependency (#465)
1 parent 4341358 commit 3554b11

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/pack.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,17 @@ function getAddonLibs(addonPath) {
393393
return line;
394394
}).catch((e) => line);
395395
}
396+
})
397+
.catch((e) => {
398+
// give more detail when ldd returns somelib.so => not found
399+
if (!line.startsWith('/')) {
400+
return exec(`ldd ${addonPath} | grep '=>' | grep -v '=> /'`).then(stdout => {
401+
e.message = `library dependency not found for\n ${addonPath}:\n${stdout}` +
402+
'Something failed to build. Try nvm use v8.15.0 and rerun build.js.';
403+
throw e;
404+
});
405+
}
406+
throw e;
396407
});
397408
checks.push(checkPros[line]);
398409
}

0 commit comments

Comments
 (0)