My system node.js version is v0.6.1 but the current stable version is v0.6.7. My system CoffeeScript version is v1.1.2 but the current stable version is v1.2.0
How could I update the node.js and CoffeeScript via terminal on mac( using mac )? I am pretty good with command line but I do need some help get started to update those applications. Thank you very much for helps.
I'm a fan of Homebrew. Once you have it installed, 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 with it, replace the first step with going to http://nodejs.org/, clicking "Download," and running the latest installer for OS X. No command line wizardry required.
Update: Since this answer was posted, several things have changed. One is that Homebrew includes npm, so you don't need to install it separately (and if you do, you need to use https://
). Another is that I would recommend using nvm to install Node rather than Homebrew, since you'll likely want to use different Node versions for different projects at some point and swapping out brew versions is no fun.
To update only coffee-script:
sudo npm update coffee-script -g
The easiest way to upgrade your Node.js version is to use a version manager such as NVM. It will also keep your old version if you'd like, along with stuff you've installed for it.
Once you upgrade you Node version, you can install CoffeeScript via NPM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With