diff --git a/cli/src/api/templates/js-binding.ts b/cli/src/api/templates/js-binding.ts index 5675d0fc..b466ecb4 100644 --- a/cli/src/api/templates/js-binding.ts +++ b/cli/src/api/templates/js-binding.ts @@ -318,11 +318,11 @@ switch (platform) { } break default: - throw new Error(\`Unsupported architecture on Linux: \${arch}\`) + loadError = new Error(\`Unsupported architecture on Linux: \${arch}\`) } break default: - throw new Error(\`Unsupported OS: \${platform}, architecture: \${arch}\`) + loadError = new Error(\`Unsupported OS: \${platform}, architecture: \${arch}\`) } if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {