node-imagemagick-native
node-imagemagick-native copied to clipboard
Can`t install on Windows 10
C:\Users\ars93\Desktop\pr>npm install imagemagick-native
[email protected] install C:\Users\ars93\Desktop\pr\node_modules\imagemagick-native node-gyp rebuild
C:\Users\ars93\Desktop\pr\node_modules\imagemagick-native>if not defined npm_config_node_gyp (node "C:\Users\ars93\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
'python' is not recognized as an internal or external command,
operable program or batch file.
gyp: Call to 'python get_regvalue.py' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Users\ars93\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\ars93\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ars93\Desktop\pr\node_modules\imagemagick-native
gyp ERR! node -v v4.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\ars93\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "imagemagick-native"
npm ERR! node v4.6.0
npm ERR! npm v3.10.8
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\ars93\Desktop\pr\npm-debug.log
You got any solution for this? If yes, then please share. I having the same issue. Thanks in advance
Hi jaidirectdsn. No my problem not solved.They didn`t answer.
npm install imagemagick will get installed correctly. But that too not working
check python.exe is in your path
the same error
Ok, here's the issue...
Now I'm hoping everyone here is a little more experienced with their system more then the average person. So if there is any terminology I'm using that you don't understand, try google.
So the error is being caused by the python file returning an error. After opening the file I figured out that all it really does it return the "MAGICK_ROOT" (install directory of your imagemagick installation) and feeds into into the building.gyp. After not being successful with changing the python file to work as intended the next logical step was just to feed the path straight into the building.gyp manually. And viola. It worked. still gotta test the binding api itself, but the build went through successfully.
So here's the change I made to building.gyp:
{
'conditions': [
['OS=="win"', {
'variables': {
'MAGICK_ROOT%': 'C:\\Program Files\\ImageMagick-6.9.3-Q16',
# download the dll binary and check off for libraries and includes
'OSX_VER%': "0",
}
}], //.......
The 'MAGICK_ROOT%': '<!(python get_regvalue.py)',
will look something like that. I just changed that to the hold the path to my imagemagick installation and then did node-gyp configure
and followed by node-gyp build
which gave me successful build.
as I said, I still gotta check the api is working but the build seemed to have finished without any error. It did have 2 warnings, but these builds always do.
Hope that helps.
I should probably also add that I git clone https://github.com/elad/node-imagemagick-native.git
manually into my node_modules folder and then worked on the files there.
i got your idea