I recently had to deal with an issue running bin/setup for the new Ember trail. I wanted to post a solution here in case anyone else runs into a similar issue.
When running bin/setup on Ubuntu it’s possible to see the following error:
sh: 1: node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
Following the instructions found here, this error is resolved by running:
The official Ubuntu repositories are out of date for some libraries, NodeJS included.
Here are instructions on installing the newest version on Ubuntu 14.04 server (works on desktop as well).
Note that the instructions boil down to:
# Install curl
sudo apt-get install curl
# Add a PPA (personal package archive) maintained by NodeSource
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
# Run this command after changing source list
sudo apt-get update
# Upgrade any installed dependancies
sudo apt-get upgrade
# Install the latest version of NodeJS
# note that NPM is now packaged with it
sudo apt-get install nodejs
Now you should be able to run sudo apt-get update and sudo apt-get upgrade when a new version of node is released.