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

Not Working On windows (before exe and after exe both) #136

Closed
basantsd opened this issue Mar 4, 2022 · 5 comments
Closed

Not Working On windows (before exe and after exe both) #136

basantsd opened this issue Mar 4, 2022 · 5 comments

Comments

@basantsd
Copy link

basantsd commented Mar 4, 2022

it's working on mac but when i install active win and excute then i got this error :

setInterval(async () => {
      const window = await activeWindow().catch((error) => console.log(error));
      console.log(window);
   }, 4000);

(node:14324) UnhandledPromiseRejectionWarning: Error: The module '\?\C:\Users\xxxxxxx\Desktop\project1\yy\node_modules\iconv\build\Release\iconv.node'
NODE_MODULE_VERSION 102. This version of Node.js requires
NODE_MODULE_VERSION 101. Please try re-compiling or re-installing
the module (for instance, using npm rebuild or npm install).
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1800)
at Object.Module._extensions..node (node:internal/modules/cjs/loader:1199:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:1800)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object. (C:\Users\ xxxxxxx\Desktop\project1\yy\node_modules\iconv\lib\iconv.js:27:14)
at Module._compile (node:internal/modules/cjs/loader:1116:14)
(Use electron --trace-warnings ... to show where the warning was created)
(node:14324) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)

@basantsd
Copy link
Author

basantsd commented Mar 4, 2022

When I generated .exe by macOS and I Facing the same issue
#112.
After installing .exe generated by - "electron-builder --win --x64" it is giving me ".tmp.node is not a valid Win32 application".

@basantsd basantsd changed the title Not Working On windows (NODE_MODULE_VERSION 102. This version of Node.js requires NODE_MODULE_VERSION 101. Please try re-compiling or re-installing) Not Working On windows (before exe and after exe both) Mar 4, 2022
@jove0610
Copy link

I had the same issue when iconv module is asking for different node version. I installed and used electron-builder and it fixed my problem.

@basantsd
Copy link
Author

I had the same issue when iconv module is asking for different node version. I installed and used electron-builder and it fixed my problem.

which node version you use ? please explain in detail. i still facing same problem.

@jove0610
Copy link

Sorry, I meant electron-rebuild.

npm install --save-dev electron-rebuild

// run this
.\node_modules\.bin\electron-rebuild.cmd

That's all I did.

@basantsd
Copy link
Author

Thanks #jove0610 now it's working, but what about urls in windows and some mac system also not return active window urls.

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

2 participants