Install MSVC10 and 64-bit nodes. When your build fails, use the following distributions that you find on the network:
unzip gtk + -bundle_2.22.1-20101229_win64.zip to c: / gtk. Use this version, others I failed
setup libjpeg-turbo-1.4.0-vc64.exe for C: \ libjpeg-turbo (32bit libs will not work without a meaningful message)
- go to. \ node_modules \ canvas \ build \ and change your binding.gyp. Add 'Variables':
{ 'GTK_Root%': 'C:/GTK', # Set the location of GTK all-in-one bundle 'with_jpeg%': 'true', 'libjpeg_root%':'C:/libjpeg-turbo', 'with_gif%': 'false', 'with_pango%': 'false', 'with_freetype%': 'false' }
and
['with_jpeg=="true"', { 'defines': [ 'HAVE_JPEG' ], 'conditions': [ ['OS=="win"', { 'libraries': [ '-l<(libjpeg_root)/lib/jpeg-static.lib','-l<(libjpeg_root)/lib/jpeg.lib' ], 'include_dirs': [ '<(libjpeg_root)/include' ] }, { 'libraries': [ '-ljpeg' ] }] ] }]
then run the following commands in the folder where the .gyp file is located:
node -gyp configure
node -gyp build
IMHO libraries for such modules should be included in npm distributions, it is strange to expect WIN32 / C ++ experience from nodejs programmer ...
Stepan yakovenko
source share