Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Twitter boostrap.less in Express

Twitter boostrap.less in Express

Problem

I followed this a link to try to configure Twitter's boostrap.less under Node 0.6.12 and Express 2.5.8:

app configuration:

app.use(express.compiler({src: publicDir, enable: ['less']}));
app.use(express.static(publicDir));

stylesheet link:

boostrap.less is the vanilla bootstrap.less file from bootstrap 2.02. the code section of it starts with:

// CSS Reset
@import "/public/stylesheets/reset.less";

When node is fired up and the page requested, the less paths get resolved correctly but the less parser throws an error:

../node_modules/less/lib/less/parser.js:385
        throw new(LessError)(e, env);

The error causes node to crash after returning a 500 error for the contents of the boostrap.css file.

Any ideas how to get bootstrap.less to work in my setup?

Problem courtesy of: rob_hicks

Solution

Just a thought, but if you have Twitter's bootstrap.less via a git submodule, do you need to update the submodule? (we made that mistake, and had the same error as you until we realized it and fixed it)

Solution courtesy of: ms-tg

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Twitter boostrap.less in Express

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×