Thursday, 26 November 2015

Bash (npm install) - Couldn't install optional dependency: Unsupported

If you are tyring to install any NPM packages, but stuck in the middle facing below issue:
"Couldn't install optional dependency: Unsupported"

npm WARN install Couldn't install optional dependency: Unsupported

> bufferutil@1.2.1 install C:\xampp\htdocs\myProject\node_modules\bufferutil
> node-gyp rebuild

C:\xampp\htdocs\wandle\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
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\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14)
gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:71:11
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\xampp\htdocs\myProject\node_modules\bufferutil
gyp ERR! node -v v5.1.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil@1.2.1 bufferutil@1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil@1.2.1 Exit status 1

> utf-8-validate@1.2.1 install C:\xampp\htdocs\myProject\node_modules\utf-8-validate
> node-gyp rebuild

Please run the below command first and try to install again, it should be fine afterwards:
$ git config --global url."https://".insteadOf git://

No comments:

Post a Comment

Please post any queries and comments here.