-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 a valid Win32 Application #1533
Comments
My guess is it's still something to do with NVM and 32 vs. 64-bit. If you're using npm, you can try overriding the target arch with |
I'm having the same problem... |
There's not enough info here to troubleshoot, so I'm going to close this for now. If anyone wants to troubleshoot further, can you please post:
and const fs = require("fs");
const path = require("path");
const cnode = path.join(require.resolve("canvas"), "../build/Release/canvas.node");
const fd = fs.openSync(cnode);
const b = Buffer.alloc(4);
fs.readSync(fd, b, 0, 4, 60);
const pe_addr = b.readUInt32LE(0);
fs.readSync(fd, b, 0, 2, pe_addr + 4);
const type = b.readUInt16LE(0);
console.log(type.toString(16)); That will print one of the values here, which should be |
@zbjornson I'm having this issue with another library, Past that, are there any extra troubleshooting steps that you might have? I understand if you don't have any since this is a different library - but anything helps. Thanks! |
@LoganDark could you share some more info on what was going wrong so I can add it to the installation troubleshooting guide please? There have been quite a few issues opened for "not a valid Win32 application" that weren't due to 64/32-bit mismatches. Maybe some were due to node-loader. |
It was fixed by this PR electron/forge#2449 that was just recently merged. Making the patch manually fixes the issue |
Issue or Feature
I'm using node-canvas along with PDF.js to transform PDFs into images, as shown in their pdf2png example.
I included this in a command line tool that was built and published on a Mac, and can run it just fine there. However, on Windows, I'm getting the following error:
I'm using NVM and have confirmed that I have a 64-bit version of both Windows and Node installed. I also tested this out using a 32-bit version of Node and am still getting the same errors.
This is a blocker for a few people, so any help would be appreciated.
Steps to Reproduce
Your Environment
npm list canvas
oryarn list canvas
): 2.6.1The text was updated successfully, but these errors were encountered: