Chris J. Lee

Dallas Drupal Developer

You are here

Install grunt js on ubuntu 13.04

Grunt.js is essentially a javascript port of java's build system, ant or maven. More closely related to ant. It uses similar vernecular: one create tasks and grunt / ant performs these tasks for you in a configuration file. For ant, one uses a config.xml file. For grunt, you need to create a, "Gruntfile.js". The filename is case sensitive. So take note to that.

Getting started on Ubuntu 13.04, 13.10

In order to get Grunt.js running one performs the following commands in your Terminal, CLI, Console or whatever you want to call it:


# Add the node.js repository
sudo add-apt-repository ppa:chris-lea/node.js

# Install nodejs
sudo apt-get install nodejs
sudo apt-get update && sudo apt-get -y dist-upgrade

# Install Node package
sudo npm install -g grunt grunt-cli

Post grunt install check

After that, one should be able to run the following to test grunt works:

where grunt

Or just run grunt: grunt.

Not working? Did you install grunt < 0.4 before?

If there is more than one instance of grunt.js be sure to review one of my recent posts regarding this: Grunt JS Error: path.js:313 throw new TypeError('Arguments to path.resolve must be strings')

© 2017 Chris J. Lee