Skip to content

Commit

Permalink
feat(ts): log error on load variant error
Browse files Browse the repository at this point in the history
  • Loading branch information
jhen0409 committed Dec 22, 2024
1 parent 2cfd84b commit 3b6914d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ export const loadModule = async (variant?: LibVariant): Promise<Module> => {
setupEnv(variant)
return await import(`../bin/${process.platform}-${variant}/${process.arch}/llama-node.node`) as Module
}
} catch {} // ignore errors and try the common path
} catch (e) {
console.error(`Failed to load module with variant ${variant}`, e)
} // ignore errors and try the common path
setupEnv()
return await import(`../bin/${process.platform}/${process.arch}/llama-node.node`) as Module
}

0 comments on commit 3b6914d

Please sign in to comment.