Electron: Uncaught Error: A dynamic link library (DLL) initialization routine failed.

Customer problem:

Hi having trouble getting @chilkat/ck-electron4-win64 working. Im getting this error:

Uncaught Error: A dynamic link library (DLL) initialization routine failed.
\\?\C:\Users\User\Documents\xyz\node_modules\@chilkat\ck-electron4-win64\chilkat.node

Resolution:

I’m unable to reproduce the problem. Here are the steps taken to install Electron 4.0.4 and use Chilkat from scratch…

using the Electron quick start as shown here:  https://github.com/electron/electron-quick-start

(1) Start the GitHub Bash shell

(2) Go to /c/Users/admin/electron-quick-start
$ npm install electron@4.0.4

(3) To run Hello World:
$ npm start

(4) Install Chilkat..
$ npm install @chilkat/ck-electron4-win64

(5) Open main.js and add the following at the top:

var os = require('os');
var chilkat = require('@chilkat/ck-electron4-win64');

(6) Add the following lines in createWindow() just to test something w/ Chilkat

     var sb = new chilkat.StringBuilder();
sb.Append("hello world");
sb.WriteFile("hello.txt","utf-8",false);

(7) Rebuild and run.

Tags :