Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ulou opened this issue Nov 5, 2020 · 3 comments
Open

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

ulou opened this issue Nov 5, 2020 · 3 comments

Comments

@ulou
Copy link

ulou commented Nov 5, 2020

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.

@ErickRodrCodes
Copy link

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
Copy link

GoodZivi commented May 5, 2023

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
Copy link
Owner

durs commented May 5, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants