node-imagemagick-native icon indicating copy to clipboard operation
node-imagemagick-native copied to clipboard

ImageMagick-native errors with node-gyp in windows10

Open jasminmif opened this issue 9 years ago • 6 comments
trafficstars

Im trying to install imagemagick which will be used for another module for printing. But im getting this error and i cant seem to find a fix for it. I've tried everything what i found in google but still nothing fixed my issue.

  • I have installed Python 2.7
  • visual community 2015 ( with C++ module )
  • ImageMagick-7.0.1-4-Q16-x64-dll

and when i try npm install imagemagick-native i get this bellow:

C:\Users\jasmi\pysoft\sms_nw\nodejs\x64_smsFrontEnd\Py-Soft>npm install imagemagick-native

> [email protected] install C:\Users\jasmi\pysoft\sms_nw\nodejs\x64_smsFrontEnd\Py-Soft\node_modules\imagemagick-native
> node-gyp rebuild


C:\Users\jasmi\pysoft\sms_nw\nodejs\x64_smsFrontEnd\Py-Soft\node_modules\imagemagick-native>if not defined npm_config_node_gyp (node "C:\Users\jasmi\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  imagemagick.cc
c:\users\jasmi\pysoft\sms_nw\nodejs\x64_smsfrontend\py-soft\node_modules\imagemagick-native\src\imagemagick.h(1): fatal error C1083: Cannot open include file: 'Magick+
+.h': No such file or directory [C:\Users\jasmi\pysoft\sms_nw\nodejs\x64_smsFrontEnd\Py-Soft\node_modules\imagemagick-native\build\imagemagick.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:\Users\jasmi\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:100:13)
gyp ERR! stack     at ChildProcess.emit (events.js:185:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.10586
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jasmi\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\jasmi\pysoft\sms_nw\nodejs\x64_smsFrontEnd\Py-Soft\node_modules\imagemagick-native
gyp ERR! node -v v5.5.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\jasmi\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "imagemagick-native"
npm ERR! node v5.5.0
npm ERR! npm  v3.9.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the imagemagick-native package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs imagemagick-native
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls imagemagick-native
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\jasmi\pysoft\sms_nw\nodejs\x64_smsFrontEnd\Py-Soft\npm-debug.log

jasminmif avatar May 19 '16 14:05 jasminmif

It looks like the compiler can't find ImageMagick's headers. If you have them, find where they are, and make sure you provide that as part of the include path.

(I don't use Windows myself so I can't be much help here...)

elad avatar May 19 '16 15:05 elad

@jasminmif Did you find a solution?

jmorrisIII avatar May 27 '16 19:05 jmorrisIII

@jmorrisIII No i have not, this looks very complicated i lost 2 days trying to figure this out. Than i moved to another solution using, python module for printing.

jasminmif avatar May 28 '16 12:05 jasminmif

I found that when you run the ImageMagick installer, there is a checkbox to install the header files. Then node-gyp seems to find them. However the compilation still fails. Log attached. npm-debug.txt

endquote avatar Jul 08 '16 16:07 endquote

I had a problem with ImageMagick v7 and had to install Imagemagick v 6.x.x from ftp://ftp.imagemagick.org/pub/ImageMagick/binaries/

Have you tried that?

buddhabuddy avatar Jan 25 '17 16:01 buddhabuddy

I have made a pull request https://github.com/elad/node-imagemagick-native/pull/194 , mean while, you can use imagemagick-native-my

bugparty avatar May 23 '19 10:05 bugparty