arvindr21 / blueimp-file-upload-expressjs

A simple express module for integrating jQuery File Upload.
http://expressjs-fileupload.cloudno.de/
104 stars 69 forks source link

can`t install from npm #44

Closed klausgao closed 9 years ago

klausgao commented 9 years ago

try the latest and some lower version but still telling:

"C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" install blueimp-file-upload-expressjs@0.4.3 --save

Exit code: 1

Standard error: gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. gyp ERR! stack at failNoPython (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14) gyp ERR! stack at C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11 gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.:95:15) gyp ERR! System Windows_NT 6.3.9600 gyp ERR! command "node" "C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd E:\NodejsProjects\node-flasky\node_modules\blueimp-file-upload-expressjs\node_modules\lwip gyp ERR! node -v v0.12.2 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js" "install" "blueimp-file-upload-expressjs@0.4.3" "--save" npm ERR! node v0.12.2 npm ERR! npm v2.7.4 npm ERR! code ELIFECYCLE

npm ERR! lwip@0.0.6 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the lwip@0.0.6 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the lwip 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 their info via: npm ERR! npm owner ls lwip npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! E:\NodejsProjects\node-flasky\npm-debug.log

Standard output:

lwip@0.0.6 install E:\NodejsProjects\node-flasky\node_modules\blueimp-file-upload-expressjs\node_modules\lwip node-gyp rebuild

E:\NodejsProjects\node-flasky\node_modules\blueimp-file-upload-expressjs\node_modules\lwip>if not defined npm_config_node_gyp (node "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (rebuild)

mycaule commented 9 years ago

Hello klausgao,

You need to install Python and Visual Studio to build the lwip dependency during the build (npm install command). Otherwise you need to fork the package if you don't need lwip which is for the creation of thumbnails, lwip is optional in the config parameters.

This problem is specific to the Windows environment where all the build tools don't come preinstalled. I have the same problem at work. In the Linux environment, the package works with all node versions (see the Travis CI builds).

mycaule commented 9 years ago

You just need to remove the lwip dependency in the package.json, in case you want to fork. The problem with the optional dependencies has been discussed in the issues.