You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8005f51
Browse filesBrowse the repository at this point in the historyBrowse files
thrownewError(`Native binding package version mismatch, expected 1.9.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
thrownewError(`Native binding package version mismatch, expected 1.9.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
thrownewError(`Native binding package version mismatch, expected 1.9.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
thrownewError(`Native binding package version mismatch, expected 1.9.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
147
+
}
148
+
returnbinding
149
+
}catch(e){
150
+
loadErrors.push(e)
135
151
}
136
-
returnbinding
137
-
}catch(e){
138
-
loadErrors.push(e)
139
-
}
140
152
}
141
153
}elseif(process.arch==='ia32'){
142
154
try{
@@ -550,7 +562,7 @@ function createLoadErrorChain(errors) {
550
562
//
551
563
// NAPI_RS_WASI_FLAVOR selects one exact generated flavor and implies strict
552
564
// WASI loading. It never crosses into another flavor or falls back to native.
// Already ours: the root entry aliases the object it loaded, so a WASI
722
+
// fallback candidate — or a `NAPI_RS_NATIVE_LIBRARY_PATH` override that
723
+
// is a generated loader — arrives already stamped with this same value.
724
+
returntarget
725
+
}
726
+
consterror=newError(
727
+
'`__napiBindingTarget` is reserved by the generated binding loader, but the loaded binding already exports it. Rename the export, e.g. #[napi(js_name = "...")].',
728
+
)
729
+
error.code='ERR_NAPI_BINDING_TARGET_CONFLICT'
730
+
throwerror
731
+
}
732
+
if(!Object.isExtensible(exportsObject)){
733
+
// A `#[napi(module_exports)]` hook may seal or freeze this object
734
+
// (`Object::seal` / `Object::freeze`). Reporting the artifact is metadata,
735
+
// never a reason to fail an otherwise successful load, so the stamp is
736
+
// skipped. What a consumer still sees then follows the entry point: the
737
+
// browser and deferred loaders declare `__napiBindingTarget` at module
738
+
// level and go on reporting it, while the CommonJS entries hand back this
739
+
// very object as `module.exports`, so there the value is absent.
740
+
returntarget
741
+
}
742
+
try{
743
+
// [[Define]], not [[Set]]: an ordinary assignment walks the prototype
744
+
// chain, so an inherited accessor could swallow the value or throw and
745
+
// fail an otherwise successful load. The descriptor is what a successful
0 commit comments