fix detecting node-addon packages (#908)
This commit is contained in:
@@ -27,9 +27,10 @@ for (const p of possible_paths) {
|
||||
if (!found) {
|
||||
let msg = `Could not find sherpa-onnx-node. Tried\n\n ${
|
||||
possible_paths.join('\n ')}\n`
|
||||
if (os.platform() == 'darwin' && process.env.DYLD_LIBRARY_PATH &&
|
||||
!process.env.DYLD_LIBRARY_PATH.includes(
|
||||
`node_modules/sherpa-onnx-${platform_arch}`)) {
|
||||
if (os.platform() == 'darwin' &&
|
||||
(!process.env.DYLD_LIBRARY_PATH ||
|
||||
!process.env.DYLD_LIBRARY_PATH.includes(
|
||||
`node_modules/sherpa-onnx-${platform_arch}`))) {
|
||||
msg +=
|
||||
'Please remeber to set the following environment variable and try again:\n';
|
||||
|
||||
@@ -39,9 +40,10 @@ if (!found) {
|
||||
msg += ':$DYLD_LIBRARY_PATH\n';
|
||||
}
|
||||
|
||||
if (os.platform() == 'linux' && process.env.LD_LIBRARY_PATH &&
|
||||
!process.env.LD_LIBRARY_PATH.includes(
|
||||
`node_modules/sherpa-onnx-${platform_arch}`)) {
|
||||
if (os.platform() == 'linux' &&
|
||||
(!process.env.LD_LIBRARY_PATH ||
|
||||
!process.env.LD_LIBRARY_PATH.includes(
|
||||
`node_modules/sherpa-onnx-${platform_arch}`))) {
|
||||
msg +=
|
||||
'Please remeber to set the following environment variable and try again:\n';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user