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

keytar.node is not a valid win32 application

Open antiochtech opened this issue 3 years ago • 4 comments

project built on ubuntu 18 x64 for win32 x64 with keytar v7.7.0.

works great on linux x64. but this is all i get on win32 x64.

Screenshot from 2021-07-14 20-05-58

antiochtech avatar Jul 15 '21 23:07 antiochtech

Is it possible your project included the linux binary for the win32 build?

If you have Git Bash or something like that on Windows, you can run file /path/to/your/project/keytar.node and it will tell you what was it built for.

sergiou87 avatar Jul 19 '21 08:07 sergiou87

i'd say youre right. project/node_modules/keytar/bin only includes a linux-x64-89 directory. seems i need to figure out how to npm install for other platforms/architectures?

antiochtech avatar Jul 20 '21 18:07 antiochtech

kinda surprised theres no progress on this?

antiochtech avatar Oct 07 '21 20:10 antiochtech

My file /path/to/your/project/keytar.node command showed me x86-64 at first. Then I electron:builder'ed it for windows. The file outputted 80386.

I solved the issue by deleting node_modules and npm install again. The file now outputs x86-64 but it works now fine.

akirataguchi115 avatar May 31 '22 05:05 akirataguchi115