Node.js installed, Grunt installed but less doesn't compile

Hello All,

I am currently trying to get a new roots theme built on a Mediatemple DV 4 server. I followed the following walkthrough with great success: http://davidseah.com/infotech/2013/07/26/installing-node-js-on-mediatemple-dv-4/

I then jumped over to Grunts’ get started page and installed the CLI using “npm install -g grunt-cli”

Then went to the roots theme folder and ran “npm install”. All dependencies seemed to install with no problems.

The problem now is that when I try to update my app.less file, nothing happens. So I figured it was something to do with less files not being recompiled. So I googled a bit and found an article telling me to run “grunt watch” when I do this in the theme root folder I get the following error: “A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started
Fatal error: Unable to find Gruntfile.”

I’m new to this whole Grunt concept and would love some direction on this one… Can’t wait for the grunt screencast. Wouldn’t mind one on creating new templates using the theme wrapper either. (I’ve read the documentation a few times and I still don’t think i’m using the theme wrapper as well as I could be).

Any help with getting my less to compile would be great. Guess I’ll just add a new .css file for now.

Thanks! - Daniel

Change directory to the theme root and double check the Gruntfile.js copied over properly. If it is there, double check the permissions were set correctly.

Looks like it was copied over fine. What should the permissions be for that file?

It depends on your server configuration. When in doubt start at 775 and then get less permissive; when it breaks you know you’ve gone too far.

Thanks, a lot. I will give this a shot with the next development considering that site is done with development now. I gotta check out that new Grunt screencast too!

  • Daniel

A quick note though, I assume you are using Mediatemple to host your live site, Grunt isn’t really made to be run on a live environment… it can, I suppose, but it’s mainly for development.