Level / leveldown

Pure C++ Node.js LevelDB binding. An abstract-leveldown compliant store.
MIT License
775 stars 176 forks source link

A dynamic link library (DLL) initialization routine failed. #500

Closed jcpc91 closed 6 years ago

jcpc91 commented 6 years ago

Hello Someone knows why I get this error

electron . App threw an error during load Error: A dynamic link library (DLL) initialization routine failed. \?\C:\Temp\app\node_modules\leveldown\build\Release\leveldown.node at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:172:20) at Object.Module._extensions..node (module.js:671:18) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:172:20) at Module.load (module.js:561:32) at tryModuleLoad (module.js:504:12) at Function.Module._load (module.js:496:3) at Module.require (module.js:586:17) at require (internal/module.js:11:18) at bindings (C:\Temp\hospitalRenal\node_modules\bindings\bindings.js:81:44) at Object. (C:\Temp\hospitalRenal\node_modules\leveldown\leveldown.js:4:46)

the application developed it on MACOS and everything worked fine but when I downloaded the project in windows10. it does not work i have this config:

{ "name": "hospitalrenal", "version": "0.0.0", "license": "MIT", "main": "main.js", "scripts": { "ng": "ng", "start": "ng build --base-href ./ && electron .", "build": "ng build --base-href ./", "run": "electron .", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "debug": "node inspect main.js", "electron-package": "ng build --prod --base-href ./ && electron-packager . --icon=path3022.icns --platform=darwin --app-bundle-id=com.jc.consultorio.renal --ignore=/e2e --ignore=/less --ignore=/src --overwrite", "less": "lessc ./less/outlook.less ./src/outlook.css --rootpath=./assets" }, "private": true, "dependencies": { "@angular/animations": "^5.2.11", "@angular/common": "^5.2.11", "@angular/compiler": "^5.2.11", "@angular/core": "^5.2.11", "@angular/forms": "^5.2.11", "@angular/http": "^5.2.11", "@angular/platform-browser": "^5.2.11", "@angular/platform-browser-dynamic": "^5.2.11", "@angular/router": "^5.2.11", "core-js": "^2.5.7", "jquery": "^3.3.1", "log-to-file": "^1.2.2", "metro4": "^4.2.14", "moment": "^2.22.2", "ngx-quill": "^3.3.0", "pouchdb": "^7.0.0", "pouchdb-find": "^7.0.0", "rxjs": "^5.5.11", "zone.js": "^0.8.19" }, "devDependencies": { "@angular/cli": "~1.7.4", "@angular/compiler-cli": "^5.2.11", "@angular/language-service": "^5.2.11", "@types/jasmine": "^2.8.8", "@types/jasminewd2": "~2.0.2", "@types/node": "^6.0.114", "codelyzer": "^4.4.2", "electron": "^2.0.5", "electron-packager": "^12.1.0", "jasmine-core": "~2.8.0", "jasmine-spec-reporter": "~4.2.1", "karma": "^2.0.4", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "^1.4.3", "karma-jasmine": "^1.1.2", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", "ts-node": "~4.1.0", "tslint": "~5.9.1", "typescript": "~2.5.3" } }

i have a proyect for test [-] https://github.com/jcpc91/test-electronjs-angular-pouchdb-.git(https://github.com/jcpc91/test-electronjs-angular-pouchdb-.git)

thanks for you help sorry for my english i dont speak

vweevers commented 6 years ago

The problem is probably --platform=darwin in:

electron-packager . --icon=path3022.icns --platform=darwin ..

This means electron-packager will build for darwin (mac). You'll want --platform=win32, or no --platform at all so that it defaults to the host platform.

If that doesn't fix it, it's probably best to ask in the electron-packager repo.

jcpc91 commented 6 years ago

yea!!! I fix my problem after hours and hours of googleing

to fix the problem: install electron-rebuild and run electron-rebuild -f -w leveldb

I leave the solution in case someone happens the same problem

thanks for you help sorry for my english i dont speak

ralphtheninja commented 6 years ago

thanks for you help sorry for my english i dont speak

Your english is good enough :wink: