node-activex
node-activex copied to clipboard
Uncaught Error: Cannot find module './build/Release/node_activex
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.
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.
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
File/folder exists? node_modules/winax/build/Release/node_activex.node