Skip to content

Electron + Windows problems #126

Description

@bluedarker

Version
@nut-tree/nut-js@1.4
Windows 10 version 1809(build 17763.1158)
Electron 8.2.3
Node 12.13.0

Short overview
Can't use with Electron, got an error

Detailed error description

Error: A dynamic link library (DLL) initialization routine failed.
\\?\c:\workspace\electron-quick-start\node_modules\@nut-tree\libnut-win32\build\Release\libnut.node
    at process.func (electron/js2c/asar.js:140:31)
    at process.func [as dlopen] (electron/js2c/asar.js:140:31)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1016:18)
    at Object.func (electron/js2c/asar.js:140:31)
    at Object.func [as .node] (electron/js2c/asar.js:140:31)
    at Module.load (internal/modules/cjs/loader.js:816:32)
    at Module._load (internal/modules/cjs/loader.js:728:14)
    at Module._load (electron/js2c/asar.js:717:26)
    at Function.Module._load (electron/js2c/asar.js:717:26)
    at Module.require (internal/modules/cjs/loader.js:853:19)

Steps to reproduce error

with Electron quick start example
obtain this error only require @nut-tree/nut-js

below is my change code in main.js

const {app, BrowserWindow,ipcMain} = require('electron')
const path = require('path')
const {
  mouse,
  left,
  right,
  up,
  down
} = require('@nut-tree/nut-js');
function createWindow () {
  // Create the browser window.
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      preload: path.join(__dirname, 'preload.js')
    }
  })

this is error screenshot
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

DONEImplementation is done, but not yet merged into masterbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions