Skip to content
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

Module did not self-register: sqlserverv8.node #312

Open
chencunlong opened this issue Nov 18, 2023 · 7 comments
Open

Module did not self-register: sqlserverv8.node #312

chencunlong opened this issue Nov 18, 2023 · 7 comments

Comments

@chencunlong
Copy link

App threw an error during load
Error: Module did not self-register: '/Volumes/data/electron/xServer/node_modules/msnodesqlv8/build/Release/sqlserverv8.node'.
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1810)
at Module._extensions..node (node:internal/modules/cjs/loader:1205:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1810)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at /Volumes/data/electron/xServer/node_modules/msnodesqlv8/lib/util.js:5:21
at Object. (/Volumes/data/electron/xServer/node_modules/msnodesqlv8/lib/util.js:35:3)

运行环境:
node version v16.20.2

electron: 21.4.4
msnodesqlv8: 4.1.1
mssql : 10.0.1

mac m2机器

@chencunlong
Copy link
Author

mac m2 arm64 项目运行报错 无法运行

@chencunlong
Copy link
Author

brew list
==> Formulae
ca-certificates mpdecimal mssql-tools18 readline
gdbm msodbcsql17 openssl@1.1 sqlite
libtool msodbcsql18 openssl@3 unixodbc
m4 mssql-tools python@3.10 xz

@TimelordUK
Copy link
Owner

TimelordUK commented Nov 18, 2023

is it similar to this #198

you need to install this module

https://www.npmjs.com/package/electron-rebuild

and run the command

./node_modules/bin/electron-rebuild

@chencunlong
Copy link
Author

is it similar to this #198

you need to install this module

https://www.npmjs.com/package/electron-rebuild

and run the command

./node_modules/bin/electron-rebuild

Thank you for solving my problem

@lroal
Copy link

lroal commented Nov 29, 2023

I am having similar issue on windows 64 bit server. But I am not using electron.
It was working fine on node 16, but when upgrading to node 20 this happened.
I am running npm install on my 64 bit PC and copying it to the windows server which is also 64 bit.
We are not allowed to run npm install on the server - so we need to build it locally. But this has worked just fine on node 16.

Application has thrown an uncaught exception and is terminated:
Error: Module did not self-register: '\\?\D:\wwwhome\wwwdfs.test.systor.st\dfs_bondensdashboard_rest\node_modules\msnodesqlv8\build\Release\sqlserverv8.node'.
    at Module._extensions..node (node:internal/modules/cjs/loader:1473:18)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at D:\wwwhome\wwwdfs.test.systor.st\dfs_bondensdashboard_rest\node_modules\msnodesqlv8\lib\util.js:3:21
    at Object.<anonymous> (D:\wwwhome\wwwdfs.test.systor.st\dfs_bondensdashboard_rest\node_modules\msnodesqlv8\lib\util.js:279:3)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)

@TimelordUK
Copy link
Owner

Are you running npm install with same version of node on workstation as server. You must copy exact binary version so if it’s 20 on server you need to install running 20 locally. Run a little test script locally and see if it works then copy over on that same version

@lroal
Copy link

lroal commented Nov 29, 2023

Sorry, I installed node 21 by a mistake on the server.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants