0

I was trying to install client-session using npm and I am getting this error also I tried installing node_gyp using npm. Also I tried to clone it using git but i am getting this node gyp error. Also I cannot find proper documents of the cause of this error.

 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 (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 (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:116:14)
    gyp ERR! stack     at C:\Program Files (x86)\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.3.9600
    gyp ERR! command "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
    gyp ERR! cwd C:\fuckyou\node_modules\client-session
    gyp ERR! node -v v4.2.4
    gyp ERR! node-gyp -v v3.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" "client-session"
    npm ERR! node v4.2.4
    npm ERR! npm  v2.14.12
    npm ERR! code ELIFECYCLE

    npm ERR! client-session@0.1.7 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the client-session@0.1.7 install script 'node-gyp rebuild'.
    npm ERR! This is most likely a problem with the client-session 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 client-session
    npm ERR! There is likely additional logging output above.

    npm ERR! Please include the following file with any support request:
    npm ERR!     C:\fuckyou\npm-debug.log
sac Dahal
  • 1,191
  • 2
  • 13
  • 37

1 Answers1

1

You need to install Python on your machine or fix the current installation.

Please refer to this answer on how to do that.

Community
  • 1
  • 1
  • never had a problem with npm install until now – sac Dahal Jun 20 '16 at 19:44
  • this is because npm relies on Python interpreter to build this module. Can you launch cmd.exe, run "python" command from there and see if it works? – Roman Stetsyshin Jun 20 '16 at 19:50
  • python is runnng fine if you look at the error its saying to install MS Visual Studio MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\fuckyou\node_modules\client-session\build\binding.sln] – sac Dahal Jun 20 '16 at 19:56
  • so I need visual studio too or what – sac Dahal Jun 20 '16 at 19:58
  • Apparently you do. That doesn't look like log you initially provided, so I assume python step is running fine now, but npm tries next step to compile some c++ code for the module, and fails again. Try to install visual studio and update node-gyp module, because Visual studio 2005 is 10 years old now :) – Roman Stetsyshin Jun 20 '16 at 20:24
  • 1
    Refer this link on updating node-gyp: https://github.com/nodejs/node-gyp/wiki/Updating-npm%27s-bundled-node-gyp – Roman Stetsyshin Jun 20 '16 at 20:25