-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
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:
internal/modules/cjs/loader.js:1208
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: \\?\C:\Users\grumbaut\Documents\books\westcivbr\node_modules\canvas\build\Release\canvas.node is not a valid Win32 application.
\\?\C:\Users\grumbaut\Documents\books\westcivbr\node_modules\canvas\build\Release\canvas.node
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1208:18)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Module.require (internal/modules/cjs/loader.js:1044:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (C:\Users\grumbaut\Documents\books\westcivbr\node_modules\canvas\lib\bindings.js:3:18)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
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
- Version of node-canvas (output of
npm list canvas
oryarn list canvas
): 2.6.1 - Environment (e.g. node 4.2.0 on Mac OS X 10.8): node 12.16.1 on Windows 10 64-bit