fix(cli): log more wasi load errors (#1943)
This commit is contained in:
commit
da2f412d79
1 changed files with 7 additions and 3 deletions
|
@ -328,14 +328,18 @@ switch (platform) {
|
|||
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
||||
try {
|
||||
nativeBinding = require('./${localName}.wasi.cjs')
|
||||
} catch {
|
||||
// ignore
|
||||
} catch (err) {
|
||||
if (process.env.NAPI_RS_FORCE_WASI) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
if (!nativeBinding) {
|
||||
try {
|
||||
nativeBinding = require('${pkgName}-wasm32-wasi')
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
if (process.env.NAPI_RS_FORCE_WASI) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue