We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 656bf3c commit d99e3b0Copy full SHA for d99e3b0
src/utils/getBin.ts
@@ -56,7 +56,16 @@ export async function loadBin(): Promise<LlamaCppNodeModule> {
56
if (prebuildBinPath == null) {
57
console.warn("Prebuild binaries not found, falling back to to locally built binaries");
58
} else {
59
- return require(prebuildBinPath);
+ try {
60
+ return require(prebuildBinPath);
61
+ } catch (err) {
62
+ console.error(`Failed to load prebuilt binary for platform "${process.platform}" "${process.arch}". Error:`, err);
63
+ console.info("Falling back to locally built binaries");
64
+
65
66
+ delete require.cache[require.resolve(prebuildBinPath)];
67
+ } catch (err) {}
68
+ }
69
}
70
71
0 commit comments