How to update node.js and CoffeeScript version via terminal on Mac?

My system is node.js version v0.6.1, but the current stable version is v0.6.7. My version of CoffeeScript is v1.1.2, but the current stable version is v1.2.0

How can I update node.js and CoffeeScript via terminal on Mac (using mac)? I am good at the command line, but I need help to start updating these applications. Thank you for help.

+8
bash terminal coffeescript
source share
3 answers

I am a fan of Homebrew. Once you installed it, you can just do

brew install node 

then install npm with

 curl http://npmjs.org/install.sh | sh 

then use it to install CoffeeScript with

 npm install -g coffee-script 

If you don’t have Homebrew or don’t want to bother him, replace the first step with http://nodejs.org/ by clicking Download and running the latest installer for OS X. No command line is required.

Update:. Since this answer has been posted, some things have changed. One of them is that Homebrew includes npm, so you do not need to install it separately (and if you do, you need to use https:// ). Another is that I recommend using nvm to install Node, not Homebrew, as you will most likely want to use different Node versions for different projects at some point and replacing brew versions is not fun.

+13
source share

Update only coffee script :

sudo npm update coffee- script -g

+13
source share

The easiest way to upgrade the version of Node.js is to use a version manager such as NVM . It will also save your old version if you want, as well as the material you installed for it.

After upgrading the Node version, you can install CoffeeScript through NPM.

+8
source share

All Articles