-
Notifications
You must be signed in to change notification settings - Fork 44
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
Error: None of the binaries loaded successfully. Is your node version either latest 4, 5, 6, 7, 8 or 9 ? #80
Comments
Is it possible in bootstrap .js to add a debug line to see if it is even attempting to load libs. Inside loop below. I assume you are running this on the cloud ? You can get code to work locally on your local machine ? Also out of interest if you just run the sample JavaScript do you see same error or does the database report an error in which case the driver has loaded. files.forEach(function (file) { |
One possibility is the library cannot load as the visual studio cpp 2017 runtime is not installed. I do run the unit tests on app veyor where library does run. If it is a dll failure this would be tricky to find without access to run diagnostics on target. |
I am facing the similar issue Error: When I start the electron app using npm start, I get the below error -
Additional information about electron app - I am using bootstrap for my UI. As per electron faq site, I have the below code in my entry html file
All the modules except electron (index.js - entry point) is imported with nodeRequire Analysis done till now - The javascript logic to connect to database and fetch records are in separate js file. When I execute the file with 'node file.js', it works perfectly fine and returns records. var files = require('fs').readdirSync(binaryDir) I have checked similar issues in github but none of the resolutions helped. UPDATED I analyzed the bootstrap.js in msnodesqlv8. These are the different error messages
|
Thanks I will take a look and get back to you
…Sent from my iPad
On 8 Oct 2018, at 04:46, Tushar Saurabh ***@***.***> wrote:
Context: I am building an electron app, which is querying a sql server (remote server) to get the data from table. I am using mssqlnodev8.
Error: When I start the electron app using npm start, I get the below error -
Uncaught Error: None of the binaries loaded successfully. Is your node version either latest 4, 5, 6, 7, 8 or 9 ? at failIfNoBinaryExported (C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:63) at Object.liveLoad (C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:50) at Object. (C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:79) at Object. (C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:81) at Module._compile (internal/modules/cjs/loader.js:711) at Object.Module._extensions..js (internal/modules/cjs/loader.js:722) at Module.load (internal/modules/cjs/loader.js:620) at tryModuleLoad (internal/modules/cjs/loader.js:559) at Function.Module._load (internal/modules/cjs/loader.js:551) at Module.require (internal/modules/cjs/loader.js:658)
Additional information about electron app - I am using bootstrap for my UI. As per electron faq site, I have the below code in my entry html file
<script>
window.nodeRequire = require;
delete window.require;
delete window.exports;
delete window.module;
</script>
All the modules except electron (index.js - entry point) is imported with
nodeRequire
Analysis done till now -
The javascript logic to connect to database and fetch records are in separate js file. When I execute the file with 'node file.js', it works perfectly fine and returns records.
The node version is v9.8.0. Electron version is 3.0.2
I analyzed bootstrap.js file in node_modules\msnodesqlv8\lib\bootstrap.js, line number 63. It traced to below code
var files = require('fs').readdirSync(binaryDir)
I changed that too nodeRequire, but it didnt work.
I have checked similar issues in github but none of the resolutions helped.
UPDATED I analyzed the bootstrap.js in msnodesqlv8. These are the different error messages
Error while exporting binary Error: ?\C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bin\sqlserverv8.electron.v2.0.4.ia32.node is not a valid Win32 application. ?\C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bin\sqlserverv8.electron.v2.0.4.ia32.node at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:166:20) at Object.Module._extensions..node (internal/modules/cjs/loader.js:740) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:166:20) at Module.load (internal/modules/cjs/loader.js:620) at tryModuleLoad (internal/modules/cjs/loader.js:559) at Function.Module._load (internal/modules/cjs/loader.js:551) at Module.require (internal/modules/cjs/loader.js:658) at require (internal/modules/cjs/helpers.js:20) at attemptToExportBinary (C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:58) at C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:48
Error while exporting binary Error: The module '?\C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bin\sqlserverv8.electron.v2.0.4.x64.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 57. This version of Node.js requires NODE_MODULE_VERSION 64. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install). at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:166:20) at Object.Module._extensions..node (internal/modules/cjs/loader.js:740) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:166:20) at Module.load (internal/modules/cjs/loader.js:620) at tryModuleLoad (internal/modules/cjs/loader.js:559) at Function.Module._load (internal/modules/cjs/loader.js:551) at Module.require (internal/modules/cjs/loader.js:658) at require (internal/modules/cjs/helpers.js:20) at attemptToExportBinary (C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:58) at C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:48
Error while exporting binary Error: ?\C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bin\sqlserverv8.node.v10.8.0.ia32.node is not a valid Win32 application. ?\C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bin\sqlserverv8.node.v10.8.0.ia32.node at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:166:20) at Object.Module._extensions..node (internal/modules/cjs/loader.js:740) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:166:20) at Module.load (internal/modules/cjs/loader.js:620) at tryModuleLoad (internal/modules/cjs/loader.js:559) at Function.Module._load (internal/modules/cjs/loader.js:551) at Module.require (internal/modules/cjs/loader.js:658) at require (internal/modules/cjs/helpers.js:20) at attemptToExportBinary (C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:58) at C:\Users\t9sau2\Documents\NodeJs\Renewalverification\node_modules\msnodesqlv8\lib\bootstrap.js:48
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
can you try again with latest version, I have not had time to look at this in detail but I have added electron vs 3 binaries which may do the trick. If this doesnt work I will reproduce issue you are seeing. try 0.6.9 from npm. |
@TimelordUK , thanks for your support. version 0.6.9 did the trick. I am no longer getting the same error in console while loading the electronjs app. |
This is an FYI for anyone that has this issue and struggles like I did to find the solution... This issue is fixed by installing electron-rebuild, and running it with the flags -p -t "dev,prod,optional". You then need to copy the resulting msnodesqlv8.node file into the lib/bin folder |
I am facing the same issue again. electron version= 4.0.7 @Durzo84 , I installed electron-rebuild and executed the following command , npm rebuild
However I dont see any msnodesqlv8.node in node_modules folder. What am I missing? |
So I guess electron binary should be named after both version of node and electron. Are you trying to run against node 10,11 and electron 4.0.7.
I can try and install same versions and build.
…Sent from my iPhone
On 6 Mar 2019, at 02:31, Tushar Saurabh ***@***.***> wrote:
I am facing the same issue again.
electron version= 4.0.7
node version = 10.11.0
msnodesqlv8 version = 0.6. 12 (the comment mentions that it works with electron 4 and node version 10)
@Durzo84 , I installed electron-rebuild and executed the following command , npm rebuild
"rebuild": "electron-rebuild -p -t msnodesqlv8"
However I dont see any msnodesqlv8.node in node_modules folder. What am I missing?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@TimelordUK , I have node 10.11 and electron 4.0.7 installed on my system. If you are looking for something else, please let me know.
--> I dont understand this, where do I check this? |
@TimelordUK , I think I understand a bit now. When I checked the bin folder, it had binaries for electron 4.0.1 and node 10.13.0. I uninstalled electron, and installed 4.0.1 and upgraded node to 10.13.0. It worked. However I have a silly question, is there a way, we can generate the binaries for msnodesqlv8? |
Thanks @tusharacc for helping me make sense of this too. |
Hi, Sorry I should have been more detailed with my response. step 1) rename ./node_modules/msnodesqlv8/bindingdotgyp.old to ./node_modules/msnodesqlv8/binding.gyp step 2) run electron rebuild (I now use this command from root dir: "cd ./node_modules/.bin/ && electron-rebuild -f -w msnodesqlv8 --module-dir ..\..\"). This tells electron-rebuild to rebuild the msnodesqlv8 module only, and that the node_modules directory it should look in is 2 levels up from the electron-rebuild modules folder step 3) move the resulting .node file from I have a gulp task that does all this for me, I can attach the code if you like. |
I should also add that because you are renaming and adding/moving files, the hash value in package-lock.json for msnodesqlv8 will no longer match what is actually in the modules folder, and whenever you add/remove/update packages, npm will reinstall whichever version of msnodesqlv8 you had installed, which will remove the new bindings file you have created, and restore the module folder to it's original state. There is probably a way to stop this from happening, but I haven't really looked into how, I just have a gulp task that does the above steps for me on postinstall. |
Thank you @Durzo84 for the information! Your steps solved my issue. Here are my package.json scripts for accomplishing these tasks after install: "scripts": {
"copybinding": "copy .\\node_modules\\msnodesqlv8\\bindingdotgyp.old .\\node_modules\\msnodesqlv8\\binding.gyp",
"rebuild": "cd .\\node_modules\\.bin\\ && electron-rebuild -f -w msnodesqlv8 --module-dir ..\\..\\",
"movenode": "move .\\node_modules\\msnodesqlv8\\bin\\win32-x64-69\\msnodesqlv8.node .\\node_modules\\msnodesqlv8\\lib\\bin\\msnodesqlv8.node",
"postinstall": "npm run copybinding && npm run rebuild && npm run movenode",
...
}, |
Works like a charm. Any way of using electron-builder instead of the rebuild? |
thanks for the great information I shall add this to the wiki - in most recent release I have included electron v5 builds against nodes version 10, 11 and 12 I am not sure if this will help however. |
If anyone is still monitoring this thread, I am facing the same problem. I have mssql working in vanilla electron, but having problems implementing with the Quasar Framework (which uses Webpack). Initial error was (Webpack 'require' is not a function) but I added msnodesqlv8, which cleared that error but raised "none of the binaries loaded" which is the topic of this thread. I tried the scripts in package.json above, but that did not clear the problem. I am at version 10.16.0 of Node, 0.8.3 of msnodesqlv8, 5.1.0 of mssql. I am hoping that someone by now has harmonized these packages, and there is some way to ensure that the packages loaded play together. If anyone has suggestions on a streamlined manner to get this all to work together, I would appreciate guidance. |
You are a lifesaver. I didn't realize I was on electron v6. Also, note to those that have trouble using electron-rebuild, I was able to get stuff working by making sure my node version matched the one electron packages |
Any advice on this: I'm trying to use: But it doesn't seem to be rebuilding. Also I don't have a Is there any way to force rebuild other than the above and where can I get the |
This librrary doesn’t yet work with electron 6. The code does not compile against this version.
…Sent from my iPhone
On 2 Oct 2019, at 12:49, arkaydeus ***@***.***> wrote:
Any advice on this:
Currently using:
Node: v10.16.1
Electron: 6.0.11
msnodesqlv8: 0.8.4
I'm trying to use:
"rebuild": "cd .\\node_modules\\.bin\\ && electron-rebuild -f -w msnodesqlv8 --module-dir ..\\..\\",
But it doesn't seem to be rebuilding. Also I don't have a bindingdotgyp.old file.
Is there any way to force rebuild other than the above and where can I get the bindingdotgyp.old file?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@TimelordUK - That would be why. Thanks for your swift response. |
Thanks for this discussion. I have re-installed electron v5.0.13 but the "none of binaries loaded" error still exists. Getting critical dependency error re ./node_modules/msnodesqlv8/lib/bootstrap.js. Any chance that electron current version 7-something can be supported? Thanks - I have mssql working in non-electron mode and it is great. |
@TimelordUK facing the same issue aswell when trying to run electron < v5... followed the steps mentioned yet to no avail. |
As of v1.0.1, binaries are no longer loaded via this method. Upon installing the latest version, Please note that the scripts posted above by @moloni-pt are no longer required. |
Hi,
Currently I'm trying to connect to a SQL Server DB using Active Directory credentials while running an azure function (node version 6.11.2) using msnodesqlv8 and mssql. This is a little test code I made for trying the connection:
And whenever I try connecting I'm getting the folowing error back:
Is there something I'm missing?.
Thanks for your help!
The text was updated successfully, but these errors were encountered: