作者/来源:yixinu.com
栏目:运维/编程
日期:2023-01-31 20:00:41
Error: Module did not self-register: '\\?\E:\AppDev\osim\nodeAddons\main1\build\Release\YixinuNet1.node'.
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at bindings (E:\AppDev\osim\nodeAddons\main1\node_modules\bindings\bindings.js:112:48)
at Object. (E:\AppDev\osim\nodeAddons\main1\test.js:1:37)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32) {
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at bindings (E:\AppDev\osim\nodeAddons\main1\node_modules\bindings\bindings.js:112:48)
at Object.
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32) {
code: 'ERR_DLOPEN_FAILED'
原因是因为 binding.gyp 文件的配置中的 sources 的第一个文件不是以 .cc 结尾
无法理解这么奇葩的问题,
binding.gyp 的 sources 的第一个文件必须以 .cc 结尾