-
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
Error installing on Windows #1501
Comments
The log you attached indicates that you're trying to install [email protected]. Recent versions of Node.js (including v12) require canvas@2. I don't know why |
Hm. I was trying to install canvas separately, but the project I'd eventually need to do npm install on specifies 1.6.13. I tried downgrading to node 10.x, and that seemed to take care of the errors (though I do get some deprecation warnings). I'll stick to 10.x for now, thank you for your help! |
PS C:\Users\maxmon\Desktop\img-tool> npm install canvas --save
node-pre-gyp WARN Using request for node-pre-gyp https download npm ERR! A complete log of this run can be found in: |
I can't install canvas with Node v12.13.0 on Windows 10, too. |
maxmon@iZ23z6bp29vZ:/home/gensound$ sudo npm install canvas -g
node-pre-gyp WARN Using needle for node-pre-gyp https download npm ERR! A complete log of this run can be found in: |
I can't install canvas with Node v12.13.0 on Ubuntu 14.04.6 LTS, too. |
v2.6.1 doesn't have a Node.js v12 prebuild for Windows available yet unfortunately. v2.6.0 does. (They're listed here: https://github.com/node-gfx/node-canvas-prebuilt/releases)
This seems to be a permission error. |
yes, I find https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v72-win32-unknown-x64.tar.gz is not exist. |
If anyone's continuing to have this problem, comment and I'll reopen. |
i tried everything on windows 7 still wont install C:\Users\afef\Desktop\js>npm install [email protected]
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Using request for node-pre-gyp https download npm ERR! code ELIFECYCLE npm ERR! A complete log of this run can be found in: |
Failing to install 2.6.1 on Windows 10, x64.
|
Please fix or at let it be known that 2.6.1 doesn't build, thank you. What an annoying thing to try to figure out. |
@inDigiNeous see #1573 (comment) and #1573 (comment) |
Installing cairo did not work for me. I'm not using a React app. Could you provide a Windows binary for Canvas on the latest version of Node? |
@zbjornson I got it building now, I don't know if I did anything or not, but the build succeeds with npm install. Just worked after coming back to the problem, maybe I messed around with something that made it work, or not. |
I followed the steps here - https://github.com/Automattic/node-canvas/wiki/Installation:-Windows - for windows installation, but I'm getting many errors on trying to do npm install canvas. Prior to following the above instructions, I only received an error that cairo.h couldn't be found. After following the above instructions, I started receiving quite a few errors (more than I can count).
I've attached a text file with the full command window output, but this is a sampling of the errors:
c:\users\aw030085\desktop\github\diabetesdashboard\node_modules\canvas\src\canvasgradient.cc(30): error C2660: 'v8::Fun
ctionTemplate::GetFunction': function does not take 0 arguments [C:\Users\aw030085\Desktop\github\diabetesdashboard\nod
e_modules\canvas\build\canvas.vcxproj]
c:\users\aw030085\appdata\local\node-gyp\cache\12.13.0\include\node\v8.h(5995): note: see declaration of 'v8::Functio
nTemplate::GetFunction' (compiling source file ..\src\CanvasGradient.cc)
c:\users\aw030085\desktop\github\diabetesdashboard\node_modules\canvas\src\canvasgradient.cc(30): error C2661: 'Nan::Se
t': no overloaded function takes 2 arguments [C:\Users\aw030085\Desktop\github\diabetesdashboard\node_modules\canvas\bu
ild\canvas.vcxproj]
c:\users\aw030085\desktop\github\diabetesdashboard\node_modules\canvas\src\canvasgradient.cc(45): error C2660: 'v8::Val
ue::NumberValue': function does not take 0 arguments [C:\Users\aw030085\Desktop\github\diabetesdashboard\node_modules\c
anvas\build\canvas.vcxproj]
c:\users\aw030085\appdata\local\node-gyp\cache\12.13.0\include\node\v8.h(2608): note: see declaration of 'v8::Value::
NumberValue' (compiling source file ..\src\CanvasGradient.cc)
canvas_errors.txt
Steps to Reproduce
Follow Windows installation instructions
Run npm install canvas
Your Environment
The text was updated successfully, but these errors were encountered: