I have two Less files in the public/stylesheets. I am using Express.js to serve them as CSS files.
The first file, one.less looks like this:
@import "another.less";
h1 {
color: red;
}
The second file, another.less looks like this:
p {
color: red;
}
When I try to load the page, the server quits with the error:
file 'another.less' wasn't found.
I have also tried an absolute path, but it didn't work.
This is my Express.js configuration:
app.configure(function(){
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.compiler({ src: __dirname + '/public', enable: ['less'] }))
app.use(app.router);
app.use(express.static(__dirname + '/public'));
});
another.lessnot found, but you provideanother.css, is that right?.lessfiles. I fixed it. Thanks for catching that!