open-unlight / node-discord-game

The Discord Game SDK for Electron.js
47 stars 9 forks source link

discord_game.node is not a valid Win32 application #6

Closed lilabyte closed 4 years ago

lilabyte commented 4 years ago

node_modules\discord-game\build\Release\discord_game.node is not a valid Win32 application.

OS: Windows 10 x64 Electron: 8.2.0 Node: 12.6.3

elct9620 commented 4 years ago

Can you describe the previous steps before you get this message?

lilabyte commented 4 years ago

Yes sir

npm i discord-game Moved discord_game_sdk.dll to the main directory

const Discord = require('discord-game')
Discord.create('Client ID', true);

Discord.Application
       .getOAuth2Token()
       .then(function(token) { console.log('Token is', token) });

and npm start

elct9620 commented 4 years ago

Do you put the discord_game.dll to the application root?

You can reference this discussion, the README is noted it.

lilabyte commented 4 years ago

image yes sir

elct9620 commented 4 years ago

Can you check your Node.js is Win32 or Win64, I find the Stackoverflow has an answer points out the problem may caused by Node.js binary.

lilabyte commented 4 years ago

My node.js is Win64

lilabyte commented 4 years ago

No idea why but somehow github downloads empty .dll files for me. When i downloaded this by view raw all works.