Trouble installing topojson on ubuntu
dictionary, node.js, npm, topojson
Solution
First, please check your version of node.js -- use the stable version, not the devel version. Second, invoke the npm command as superuser.
$ sudo npm install -g topojson
So far, when I switch my node.js into stable version, TopoJSON installation is running well. Thank you for your attention.
Problem
I've been trying to install topojson by following Mike Bostock's Let's Make a Map tutorial http://bost.ocks.org/mike/map/ and I believe I have managed to get the most recent version of Node.js and npm. $which ogr2ogr works as well. I'm quite new to programming and Ubuntu and would sincerely appreciate some thorough help as to why npm install topojson -g yields the following errors. When I try the same command with sudo it yields errors like: npm ERR! registry error parsing json and gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead Thanks! ``` npm ERR! Error: EACCES, open '/home/natecraft/.npm/7edf76d6-topojson.lock' npm ERR! { [Error: EACCES, open '/home/natecraft/.npm/7edf76d6-topojson.lock'] npm ERR! errno: 3, npm ERR! code: 'EACCES', npm ERR! path: '/home/natecraft/.npm/7edf76d6-topojson.lock' } npm ERR! npm ERR! Please try running this command again as root/Administrator. npm ERR! System Linux 3.5.0-23-generic npm ERR! command "/home/natecraft/.nvm/v0.10.15/bin/node" "/home/natecraft/.nvm/v0.10.15/bin/npm" "install" "topojson" "-g" npm ERR! cwd /home/natecraft/Downloads/node-latest-install npm ERR! node -v v0.10.15 npm ERR! npm -v 1.3.5 npm ERR! path /home/natecraft/.npm/7edf76d6-topojson.lock npm ERR! code EACCES npm ERR! errno 3 npm ERR! stack Error: EACCES, open '/home/natecraft/.npm/7edf76d6-topojson.lock' npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/natecraft/Downloads/node-latest-install/npm-debug.log npm ERR! not ok code 0 ```