Ask me k'no'w querries, I will tell you no lies

Yeoman

June 10, 2013

My OS : Ubuntu 12.04

All commands are executed in Terminal unless otherwise specified

node.js installation

Checking if node is already installed or not

~$ which node
/usr/local/bin/node

Checking the installed node version

~$ node -v
v0.8.9

Current Node Version: v0.10.10

Even though the latest node is not installed i am going ahead with the v0.8.9 node and see if i can install yeoman on this system.

Checking npm(Node Package Manager) is installed or not

~$ which npm
~$

There is no npm installed in my system.

npm installation

~$ sudo apt-get install npm
[sudo] password for auto-w24: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 npm : Depends: nodejs but it is not going to be installed
       Depends: nodejs-dev
       Depends: node-request but it is not going to be installed
       Depends: node-mkdirp but it is not going to be installed
       Depends: node-minimatch but it is not going to be installed
       Depends: node-semver but it is not going to be installed
       Depends: node-ini but it is not going to be installed
       Depends: node-graceful-fs but it is not going to be installed
       Depends: node-abbrev but it is not going to be installed
       Depends: node-nopt but it is not going to be installed
       Depends: node-fstream but it is not going to be installed
       Depends: node-rimraf but it is not going to be installed
       Depends: node-tar but it is not going to be installed
       Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

So i searched for installing npm in ubuntu 12.04 which lead me to this link.

After going through that discussion i used following commands to install nodejs and npm

sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

As per the discussion in the link Node.js v0.10.0, the nodejs package from Chris Lea’s repo includes both npm and nodejs-dev so no need to give sudo apt-get install nodejs npm but just sudo apt-get install nodejs

Now Checking if nodejs and npm installed or not after all these steps

~$ which nodejs
/usr/bin/nodejs
~$ which npm
/usr/local/bin/npm
~$ nodejs -v
v0.10.10
~$ npm -v
1.2.27

Finally node.js and npm are installed.

Additional requirements for installing Yeoman is Git (Ruby and Compass {optional}).

Checking if Git is installed or not

$ which git
/usr/bin/git
$ git --version
git version 1.7.9.5 

Checking if Ruby installed or not

~$ which ruby
/usr/bin/ruby
$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

Checking if Compass installed or not

~$ which compass
/usr/local/bin/compass
~$ compass -v
Compass 0.12.2 (Alnilam)
Copyright (c) 2008-2013 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: https://umdf.org/compass

We have all required dependencies to install yeoman

Let us install yeoman

npm install -g yo grunt-cli bower

Checking if Yeoman installed or not

~$ yo

You should see colourful yeoman logo and bunch of directions to install generators and how to use theme etc.I did see them when the above command is run in my terminal.

Successfully installed Yeoman in my work system.


Ekancepts

Ekancepts