Link to home
Start Free TrialLog in
Avatar of coder
coderFlag for Australia

asked on

Installation error for npm install canvas

Hi Experts,

      I had tried installing Canvas with NPM.  Installation is not succeeding.  I get the following error

c:\...\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:\...\pdf-optimise\node_modules\canvas\build\canvas.vcxproj]

I had followed the steps mention at this url  https://github.com/benjamind/delarre.docpad/blob/master/src/documents/posts/installing-node-canvas-for-windows.html.md

Please help me in resolving this. issue

With Many Thanks,

Bharath AK
ASKER CERTIFIED SOLUTION
Avatar of Sam Simon Nasser
Sam Simon Nasser
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of coder

ASKER

Hi Simon,

Now I am trying manually,

But get linker errors like this,

Canvas.obj : error LNK2001: unresolved external symbol png_destroy_write_struct [C:\Users\ripia\AppData\Roaming\npm\nod
e_modules\canvas\build\canvas.vcxproj]

Please help  me in resolving this.

Many thanks,
Bharath AK
Avatar of coder

ASKER

Hi All,

     I changed the working(development) environment to linux and there are many issues with node-canvas.  Hence closing this problem

With Many thanks,

Bharath AK