-
Notifications
You must be signed in to change notification settings - Fork 1.2k
canvas.node is not a valid Win32 application. #1597
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
Comments
This usually means you have mismatched node-canvas and Node.js architectures (32 vs. 64 bit). Can you please post:
and // save in a file and run with node
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 8664 (64-bit) or 14c (32-bit). |
`const cnode = path.join(require.resolve("canvas"), "../build/Release/canvas.node"); ReferenceError: path is not defined` |
@Aman78600 sorry, I missed a line. I edited my previous comment, can you try it again please? |
|
Can you post |
If you have discord please try to message me their. Thanks |
@zbjornson Please Help |
Can you provide the info that was in the issue template please? (OS, Node.js version, Canvas version) Trying to run on WinXP is another possible cause. You can drop canvas.node into dependency walker to hopefully get a more useful error. This is tricky to troubleshoot. |
I figured Out it |
I also get this problem.
Here is the information that you want.
Windows 10 x64 |
@ShootDot I have installed Node Module Version 72 ( v12.18.4) |
Closing because there's not enough info to troubleshoot. Please open a new issue if anyone is still having problems. |
فایل package.json تون باید به این صورت باشه { } |
Issue or Feature
Everytime when I install canvas I get the error canvas.node is not a valid Win32 application.
The text was updated successfully, but these errors were encountered: