node-activex icon indicating copy to clipboard operation
node-activex copied to clipboard

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

Open ulou opened this issue 4 years ago • 3 comments

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 webpack or something. I checked build/Release/node_activex in node_modules and 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.

ulou avatar Nov 05 '20 15:11 ulou

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.

ErickRodrCodes avatar Aug 09 '21 23:08 ErickRodrCodes

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

GoodZivi avatar May 05 '23 03:05 GoodZivi

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

durs avatar May 05 '23 19:05 durs