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
Copy the index.*.node file to webpack_output directory and maybe it is good idea rename that from index (name in some native modules) to other to avoid collision
Actual Behavior
TypeError: Can not find node binding files from kobadonga-win32-x64-gnu, kobadonga-win32-x64-msvc and C:\Users\user\Documents\Repos\example-issue-node-loader\example\webpack_output\main\index.win32-x64-gnu.node, C:\Users\user\Documents\Repos\example-issue-node-loader\example\webpack_output\main\index.win32-x64-msvc.node
at loadBinding (webpack-internal:///./node_modules/@node-rs/helper/lib/loader.js:27:11)
at eval (webpack-internal:///./node_modules/kobadonga/index.js:3:18)
at Object../node_modules/kobadonga/index.js (C:\Users\user\Documents\Repos\example-issue-node-loader\example\webpack_output\main\index.js:143:1)
at __webpack_require__ (C:\Users\user\Documents\Repos\example-issue-node-loader\example\webpack_output\main\index.js:21:30)
at eval (webpack-internal:///./src/main.ts:43:35)
at Object../src/main.ts (C:\Users\user\Documents\Repos\example-issue-node-loader\example\webpack_output\main\index.js:155:1)
at __webpack_require__ (C:\Users\user\Documents\Repos\example-issue-node-loader\example\webpack_output\main\index.js:21:30)
at C:\Users\user\Documents\Repos\example-issue-node-loader\example\webpack_output\main\index.js:85:18
at Object.<anonymous> (C:\Users\user\Documents\Repos\example-issue-node-loader\example\webpack_output\main\index.js:88:10)
at Module._compile (internal/modules/cjs/loader.js:1152:30)
The native dependency is built first (using NAPI-rs) and it put the index.*.node in the package directory, in package.json files include *.node. The dependency is in the other package.json as a file: dependency, and can find the *.js file but do nothing about the native module file.
Additional information
I realize now about the .node file is not copied inside node_modules subdirectory even it is in package.jsonfiles property. Maybe because it is defined as file: dependency instead of a gzip.
Another try
Packing using yarn pack and using that in the file: path the .node file is in node_modules but the error is same.
The text was updated successfully, but these errors were encountered:
Expected Behavior
Copy the index.*.node file to webpack_output directory and maybe it is good idea rename that from index (name in some native modules) to other to avoid collision
Actual Behavior
Code
How Do We Reproduce?
Download the zip and the readme file has instructions to build and reproduce it:
example-issue-node-loader.zip
The native dependency is built first (using NAPI-rs) and it put the
index.*.node
in the package directory, inpackage.json
files include*.node
. The dependency is in the otherpackage.json
as afile:
dependency, and can find the*.js
file but do nothing about the native module file.Additional information
I realize now about the
.node
file is not copied insidenode_modules
subdirectory even it is inpackage.json
files
property. Maybe because it is defined asfile:
dependency instead of a gzip.Another try
Packing using
yarn pack
and using that in thefile:
path the.node
file is innode_modules
but the error is same.The text was updated successfully, but these errors were encountered: