0

Here's what it returns when I try install contextify:

npm install contextify
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN install Couldn't install optional dependency: Unsupported

> contextify@0.1.14 install F:\_vms\HomesteadCode\_live\misc\web-react\node_modules\contextify
> node-gyp rebuild


F:\_vms\HomesteadCode\_live\misc\web-react\node_modules\contextify>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: F:\Program Files (x86)\nodejs\common.gypi not found (cwd: F:\_vms\HomesteadCode\_live\misc\web-react\node_modules\contextify) while reading includes of 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:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:357:16)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
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 F:\_vms\HomesteadCode\_live\misc\web-react\node_modules\contextify
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.2
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" "contextify"
npm ERR! node v0.12.7
npm ERR! npm  v3.3.1
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     F:\_vms\HomesteadCode\_live\misc\web-react\npm-debug.log

UPDATE: Got it installed... perhaps the hard way.

  • Installed Visual Studio 2013 (removed 2015)
  • Made sure I have latest nodejs
  • Cleaned up environment paths. (Checkout Rapidee)
  • Add a system variable: (mine: set VCTargetsPath=C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120)
  • From my global node_modules (for me F:\Program Files\nodejs\node_modules\npm\node_modules) I cloned repo git clone git@github.com:brianmcd/contextify.git. CD into then rm -rf .git.
  • I had to next npm i nan
  • node-gyp rebuild

It installed without any more complaints!!!!

I hope that someone comes up with a better solution than this!!!

Larry Eitel
  • 1,397
  • 5
  • 19
  • 37
  • Regarding part of the above error message: "F:\Program Files (x86)\nodejs\common.gypi not found", "common.gypi" is not in that dir or anywhere else that I can tell off-hand. – Larry Eitel Aug 29 '15 at 01:48

2 Answers2

0

Look at this link:

common.gypi not found error in node.js

Seems to be a common issue these days.

You can check https://github.com/TooTallNate/node-gyp/issues/313 and https://github.com/TooTallNate/node-gyp/issues/376 to see if any of these solutions solve your issue.

Particularly, you can:

  1. Remove old dir ~/.node_gyp and run npm install

  2. Copy an older version (ex: ~/.node-gyp/0.10.11/) to the complying path.

  3. Copy the latest version to the complying path.

  4. Chime in this thread to get help.

PS:

When I tried installing on Windows, I get a completely different error:

d:\temp>npm install -g contextify
> contextify@0.1.14 install C:\Users\paulsm\AppData\Roaming\npm\node_module\contextify
> node-gyp rebuild

C:\Users\paulsm\AppData\Roaming\npm\node_modules\contextify>node "D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" 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 (D:\Program Files\nodejs\node_module\npm\node_modules\node-gyp\lib\configure.js:103:14)
<= NOTE: This is *not* your problem

When I ran sudo npm install -g contextify on a Linux box ... "everything worked".

Again - please review the links above, and see if they help.

Community
  • 1
  • 1
paulsm4
  • 114,292
  • 17
  • 138
  • 190
  • Not having any apparent issues with Python. I have been through the links you mentioned and many more. I installed latest MSVS 2015 too. – Larry Eitel Aug 29 '15 at 01:23
  • I agree - it doesn't sound like Python is the culprit. Q: Did you read the part about "copy an older version (ex: ~/.node-gyp) to the complying path"? – paulsm4 Aug 29 '15 at 02:06
  • No I didn't try the "copy an older version" part. Do I really have to? :( – Larry Eitel Aug 31 '15 at 02:28
0

This is problem with python on windows ( https://github.com/nodejs/node-gyp/issues/629 )

There is probably not much you can do about this. You can try some workarounds, that they suggest in comments, but I do not know how much it'll help you.