durs / node-activex

Node.JS Implementaion of ActiveXObject
MIT License
329 stars 62 forks source link

Uncaught Error: Cannot find module './build/Release/node_activex #86

Open ulou opened 4 years ago

ulou commented 4 years ago

System info: yarn: 1.22.10 node: 14.15.0 npm: 6.14.5 system: windows 10 64bit

I just fetched: https://github.com/codesbiome/electron-react-webpack-typescript-2020 then run: yarn add winax then import in app.tsx then add in app.tsx following line required("winax") (or import "winax")

and following error occurs, I tried a lot of think from google, but looks like file is not seen by webpackor something. I checked build/Release/node_activex in node_modulesand those files are there.

Uncaught Error: Cannot find module './build/Release/node_activex' at webpackMissingModule (activex.js:1) at Object../node_modules/winax/activex.js (activex.js:1) at __webpack_require__ (bootstrap:789) at fn (bootstrap:100) at Object../node_modules/winax/index.js (index.js:1) at __webpack_require__ (bootstrap:789) at fn (bootstrap:100) at Module../src/app/core/Subiekt.ts (Subiekt.ts:1) at __webpack_require__ (bootstrap:789) at fn (bootstrap:100)

I've tried commands from winax and electron docs like electron-rebuild, installing windows-tools ect., but without any result.

ErickRodrCodes commented 3 years ago

The solution to the problem is quite simple:

go to activex.js and change:

var ActiveX = module.exports = require('./build/Release/node_activex');

to

var ActiveX = module.exports = require('./build/Release/node_activex.node');

that allows you to properly import the node_activex component that without hassle.

GoodZivi commented 1 year ago

The solution to the problem is quite simple:

go to activex.js and change:

var ActiveX = module.exports = require('./build/Release/node_activex');

to

var ActiveX = module.exports = require('./build/Release/node_activex.node');

that allows you to properly import the node_activex component that without hassle.

This method is not work. The first line of the activex.js is exactly that

durs commented 1 year ago

File/folder exists? node_modules/winax/build/Release/node_activex.node