samick17 / windows-automator-lib

This is the wrapper of windows-OS mouse/keyboard API implemented in C++.Wrapped in NodeJs
MIT License
3 stars 1 forks source link

Getting an error while requiring the node module #2

Closed nsaidhugari closed 6 years ago

nsaidhugari commented 6 years ago

Hi @samick17,

When I'm trying to require the "windows-automator-lib" with node version 8.9.2 getting the below error

"Error: The module '\?\C:\node_modules\windows-automator-lib\d ist\Automator.node'"

window-automator-lib

Can you please look into it.

Thanks, Niharika

duvemula commented 6 years ago

Hi @samick17 ,

I am also facing above issue with node 8.9.1 version.

Could you please take a look.

Please let us know if need more information.

Regards, Durga Prasad

samick17 commented 6 years ago

Hi: It's my wrong when package the node module. I was fixed in 1.4.0. Please update package of windows-automator-lib to 1.4.0. If this error still occurs, I'll fix it as soon as possible.

Regards Samick.

nsaidhugari commented 6 years ago

Hi @samick17 ,

I'm using the same "windows-automator-lib" 1.4.0 node module only. But still I'm facing the same issue.

Can you please look into it.

Thanks, Niharika

samick17 commented 6 years ago

Hi @nsaidhugari , @duvemula :

The rootcause is abi version not matched with node js Replace the file Automator57.node with Automator.node at node_modules\windows-automator-lib\dist

Node ABI Version reference: https://nodejs.org/en/download/releases/

Regards, Samick.

duvemula commented 6 years ago

Hi @samick17 ,

I am facing Error: \?\C:\Tellus\node_modules\windows-automat or-lib\dist\Automator.node is not a valid Win32 application\?\C:\Tellus\node_mo dules\windows-automator-lib\dist\Automator.node error.

could you please take a look.

Please let me know if you need more information

Regards, Durga Prasad

samick17 commented 6 years ago

Hi @duvemula, @nsaidhugari

Hmm, could you check which windows arch is (x86 or x64). The node module was built for x64, and not support for x86, I'll update x86 version at next release.

You can also build from source code. Before build from source, please setup environment for node-gyp: https://github.com/nodejs/node-gyp

2018/04/26 I'v update module to 1.4.2, and rebuild all modules for x86/x64 arch. Using following npm scripts to update module.

npm install windows-automator-lib --save

Samick, Regards

nsaidhugari commented 6 years ago

Hi @samick17 ,

I tried installing the latest version of windows-automator-lib i.e.,1.4.2 version , but getting errors while installing. windows-automator-lib

where as I'm able to install windows-automator-lib 1.0.1 version. Specifications: I'm using node -v 8.9.1 32 bit.

Can you please do needful

Thanks, Niharika

samick17 commented 6 years ago

Hi @nsaidhugari ,

This problem is caused by typo of arch(I name it as Automator_x86.node, but it should be Automator_ia32.node) I'v update module to 1.4.3, you can also check distributed files by the following link. https://github.com/samick17/windows-automator-lib/tree/master/dist

Thank you for your contribution!

Samick

nsaidhugari commented 6 years ago

Hi @samick17 ,

Thank you for the fix. Now I'm able to install the node-module of the latest version.

But when I'm requiring it I'm still getting the same errors

image

Can you please look into it.

Thanks, Niharika

samick17 commented 6 years ago

Hi @nsaidhugari ,

Have you installed this module globally? I've found the error path and installed path is not match.

C:\Tellus\node_modules\windows-automator-lib\dist\Automator.node C:\Users\qaadmin\node_modules\windows-automator-lib

Using following command can check module version with global/local package.

npm ls windows-automator-lib

npm ls windows-automator-lib -g

The following picture is snapshot from my worksapce, after update module locally, you may using "require('windows-automator-lib').Core.getAllWindows()" when running protractor

protractor-screenshot1

Regards, Samick.

nsaidhugari commented 6 years ago

Hi @samick17 ,

Thanks a lot for the help. I'm able to install it and its working fine now.

Regards, Niharika

samick17 commented 6 years ago

Ok, I'll close this issue.