diff --git a/src/runtimes/node/utils/detect_native_module.ts b/src/runtimes/node/utils/detect_native_module.ts index c67d38fb9..a8e387a7f 100644 --- a/src/runtimes/node/utils/detect_native_module.ts +++ b/src/runtimes/node/utils/detect_native_module.ts @@ -21,7 +21,10 @@ export const isNativeModule = ({ return true } - const hasBinaryFile = files.some((path) => !path.startsWith('!') && extname(path) === '.node') + // Check if files is an array, as we never know (see https://github.com/math-utils/hamming-distance/pull/4) + const hasBinaryFile = Array.isArray(files) + ? files.some((path) => !path.startsWith('!') && extname(path) === '.node') + : false return hasBinaryFile }