Skip to content
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

Add canvas or canvas-prebuilt as dependency #241

Closed
molant opened this issue May 30, 2017 · 0 comments
Closed

Add canvas or canvas-prebuilt as dependency #241

molant opened this issue May 30, 2017 · 0 comments

Comments

@molant
Copy link
Member

molant commented May 30, 2017

We need canvas or canvas-prebuilt to download images when using jsdom.

canvas-prebuilt doesn't support node 8 yet and I'm having compiling issues with node 8 and windows:

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  Canvas.cc
  CanvasGradient.cc
  CanvasPattern.cc
  CanvasRenderingContext2d.cc
c:\projects\sonar\node_modules\canvas\src\Canvas.h(19): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory (compiling source file ..\src\CanvasPatt
ern.cc) [C:\Projects\Sonar\node_modules\canvas\build\canvas.vcxproj]
c:\projects\sonar\node_modules\canvas\src\Canvas.h(19): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory (compiling source file ..\src\CanvasGrad
ient.cc) [C:\Projects\Sonar\node_modules\canvas\build\canvas.vcxproj]
c:\projects\sonar\node_modules\canvas\src\Canvas.h(19): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory (compiling source file ..\src\CanvasRend
eringContext2d.cc) [C:\Projects\Sonar\node_modules\canvas\build\canvas.vcxproj]
c:\projects\sonar\node_modules\canvas\src\Canvas.h(19): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory (compiling source file ..\src\Canvas.cc)
 [C:\Projects\Sonar\node_modules\canvas\build\canvas.vcxproj]
This was referenced May 30, 2017
molant pushed a commit that referenced this issue May 31, 2017
For JSDOM to download images we need canvas or canvas-prebuilt as a
peerDependency. canvas-prebuild doesn't support node 8.

Update .travis.yml script to install all dependencies to build canvas.

**Windows users**: [Install all dependencies using
cholatey](https://github.com/Automattic/node-canvas/wiki/Installation---Windows#install-with-chocolate)
if you don't have them already except the GTK one. Manually download
the file and unzip it in C:\GTK so it compiles.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Fix #241
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant