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

Error in Windows npm install... C1083: Cannot open include file: 'cairo.h': No such file or #3611

Closed
born2net opened this issue Jan 6, 2017 · 1 comment

Comments

@born2net
Copy link

born2net commented Jan 6, 2017

When installing in Windows 10 x86 got the follwing error:

c:\msweb\studiotouch\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\Image.cc) [C:\msweb\studioTouch\node_modules\canvas\build\canvas.vcxproj]
c:\msweb\studiotouch\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\CanvasPattern.cc) [C:\msweb\studioTouch\node_modules\canvas\build\canvas.vcxproj]
c:\msweb\studiotouch\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:\msweb\studioTouch\node_modules\canvas\build\canvas.vcxproj]
c:\msweb\studiotouch\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\CanvasGradient.cc) [C:\msweb\studioTouch\node_modules\canvas\build\canvas.vcxproj]
c:\msweb\studiotouch\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\CanvasRenderingContext2d.cc) [C:\msweb\studioTouch\node_modules\canvas\build\canvas.vcxproj ]
c:\msweb\studiotouch\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\ImageData.cc) [C:\msweb\studioTouch\node_modules\canvas\build\canvas.vcxproj]
c:\msweb\studiotouch\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\init.cc) [C:\msweb\studioTouch\node_modules\canvas\build\canvas.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\msweb\studioTouch\node_modules\canvas
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1

regards

Sean.

@born2net
Copy link
Author

born2net commented Jan 6, 2017

had to copy c:\GTK
as per:
https://github.com/benjamind/delarre.docpad/blob/master/src/documents/posts/installing-node-canvas-for-windows.html.md

@born2net born2net closed this as completed Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant