2

I experienced problems with installing TopoJSON.

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform oolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...". [C:\Users\Sigita\AppData\Roaming\npm\node_modules\topojson\node_modules\d3\node_modules\jsdom\node_modules\contextify\build\contextify.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Sigita\AppData\Roaming\npm\node_modules\topojson\node_modules\d3\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
...
npm ERR! contextify@0.1.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.8 install script.
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! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "topojson"
npm ERR! cwd C:\Users\Sigita
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Sigita\npm-debug.log
npm ERR! not ok code 0

I'm running it on Windows 8.1. with all updates installed, npm version 1.4.3., gyp 0.13.0 and node.js 0.10.26.

  • This is a duplicate of a post on Stack Exchange: Topojson build fails in Windows. I can't mark it as such since it's on a different network site. – Jason Scheirer May 30 '14 at 20:29
  • 1
    I am voting to keep this one open, because TopoJSON seems on-topic for here and the StackOverflow Question is nearly a year old and seems to be about a slightly different configuration. If anyone feels qualified to copy the relevant parts from the StackOverflow Answer here as an Answer that could help the asker then that is something that I could upvote. – PolyGeo May 30 '14 at 22:37
2

Currently I would stay away from installing topojson on Windows 8 especially due to those build errors of contextify.

Especially if you're developing on multiple machines I would prefer doing this in a virtual machine for now, so you have your environment readily available and you can make easy use of makefiles as a bonus. The overhead of heaving three different versions of VS installed with no sure way of knowing if it work's just wastes too much time. If someday contextify compiles out of the box on Windows 8+ things will hopefully be easier again.

Start with getting a slim node.js Virtual Machine for a VM like VirtualBox from a place like bitnami, you could build you own but this kind of defeats the purpose of having a lightweight environment set up quickly.

sudo npm install -g topojson

Now topojson should work out of the box in the VM.

To move files between host system and client add the virtualbox additions to the installation as described here. Then add the shared host folder in the VM UI (Devices > shared folder setting) and mount it.

sudo mkdir ~/shared
sudo mount -t vboxsf shared_name ~/shared/

UPDATE: meanwhile I switched to developing for web on a Mac because of a plentitude of issues like this with a number of npm modules.

In Windows 10 I would give the Windows Subsystem for Linux a try though, npm support was spotty when I last checked in August 2016.

0

Here is one solution, I have recently installed topojson and able to convert shapefiles to topojson easily... Windows 8.1 is not a problem i hope.. there are multiple dependencies for topojson but i don't know if the order of installing them really matters or not.

  1. Have you installed MS Visual Studio..?? if not then install it first.. version really doesn't matter.
  2. Install GDAL
  3. Install Python (2.7 or later).
  4. Install FWTools (2.4.7)
  5. Install node.js
  6. Then install topojson through npm

I hope this would make it working..

0

Looking at the issues on the TopoJSON tracker with keyword contextify, I see this particular issue and also this one.

It's seems to be related to Jsdom (this module relies on contextify) Both issues pointed should be quite clear to solve your issue.

0

I have created an extensive German tutorial about how to install topoJSON/contextify and for sure node-gyp on a Windows system. I hope it is as detailed as possible and some of you can now manage to install it. Because it is in German I added as many pictures as possible. Hope you like it: http://www.kwoxer.de/2015/01/26/topojson-contextify-node-gym-unter-windows-installieren-tutorial/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.