From 0306e3045a0891f280cb7154fd9637ed2eb78f0d Mon Sep 17 00:00:00 2001 From: LongYinan Date: Wed, 21 Feb 2024 23:48:29 +0800 Subject: [PATCH] fix(cli): fallback to wasm32 if platform is not support (#1967) --- cli/src/api/templates/js-binding.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {