Skip to content

Keep node.js up to date!

24. July 2013

Installing topojson on Ubuntu is pretty simple, right?
But what if you’d like to update it and afterwards it is completely wrecked!?! That happened to me yesterday and I’d like to share my experiences with you! Especially you, who is not experienced in working with the node package manager ‘npm’, as I am (or at least was before I had this problem)!

I reported the issue to the developer of topojson (Mike Bostock), but I already had the feeling that it is not a problem on topojson! As he did not report any idea, I knew I have to do it on my own.

1st solution

After many trials and errors, trying to update other node-modules and some resignations … I remembered that I have read ‘”pre” versions of node cannot be installed’, somewhere. That does not fit to my failure, but maybe it is basically not good to use a ‘pre’ version of node.js.
So I installed a node version manager ‘nvm‘ and updated node to the latest, not ‘pre’, version:

cd ~/Software
git clone git:// ~/nvm
. ~/nvm/
nvm install v0.10.13
nvm use v0.10.13

Now I can simply install topojson as I did before!

sudo npm install -g topojson

But sadly, this helps just for the moment. Opening a new terminal…forces me now to start nvm, before I can call topojson:

. ~/nvm/
nvm use v0.10.13

It seems, that topojson is now linked to the ‘node’ version that I’ve installed with ‘nvm’.

2nd solution

Therefore, I re-install node completely. So I

  • downloaded node-version 0.10.13, here
  • installed it normally:
    sudo make install
    node -v
  • and re-installed topojson
    npm install -g topojson

Now, everything is clean again and I can call topojson directly after opening a new terminal, without initialising ‘nvm’!

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: