fix(cli): log more wasi load errors
This commit is contained in:
parent
0205fd976e
commit
ff2ccc9f37
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