-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node custom plugin issue return process.dlopen(module, path.toNamespacedPath(filename)); #3675
Comments
The quotation marks in the path in the error message surprise me. What path are you passing to |
ping @CaptianFluffy100 |
A terrible problem, I don't know how it came about either,i aslo get this error.I was searching for an answer to this and came here. I tried to copy a *. node file and access it using JavaScript , ( which was generated by node-canvas ). Because node-canvas has stopped maintenance, I don't know if it's the node's problem or node-canvasproblem, but I saw that node/api/cli.md?plain=1#L129mentioned the same code. |
It seems that the way of accessing binary files is incorrect. If it is accessed directly according to the path, it will get this error |
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. |
Details
Hello, I recently started to code C++ plugins for nodejs. I have two pcs with node version 16.13.0, npm v8.1.0. On the PC that I built the plugin, runs the plugin fine, but as soon as I copy the plugin onto the other PC and import(require) it into node the same way as I did with the PC, it throws an error.
node:internal/modules/cjs/loader:1183 return process.dlopen(module, path.toNamespacedPath(filename));
Error: /home/"user"/"project folder"/"plugin folder"/"plugin name".node: cannot open shared object file: No such file or directory at Object.Module._extensions..node (node:internal/modules/cjs/loader:1183:18) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/home/henk/DroneSoftware/app.js:272:20) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) { code: 'ERR_DLOPEN_FAILED' }
This file does exist.
Node.js version
16.13.0
Example code
No response
Operating system
Ubuntu 20.04 LTS & Ubuntu 18.04 LTS
Scope
Not applicable.
Module and version
Not applicable.
The text was updated successfully, but these errors were encountered: