Take the 2-minute tour ×

I have a project that uses Nib and Stylus on Express server, and after some changes this compilation process from .styl to .css didn't work anymore, I was looking in documentation of Nib, Stylus and Express but I can't find an answero to problem because my code, file directory and settings seems ok. But still doesn't compile.


express = require("express")
coffee = require("coffee-script")
stylus = require("stylus")
jade = require("jade")
nib = require("nib")

app = express.createServer()
port = process.env.PORT || 3000
app.use app.router
app.use express.methodOverride()
app.use express.bodyParser()
app.set "views", __dirname + "/views"
app.set "view engine", "jade"
app.use stylus.middleware(
    src: __dirname + "/src"
    dest: __dirname + "/public"
    compile: (str, path) ->
      stylus(str).set("filename", path).set("warn", true).set("compress", false).set("paths", [ require("stylus-blueprint") ]).use nib()
app.listen port

After looking into documention, Github issues, I can't understand what changes have been made to stop working. So, my question, how or what I should be looking for to try resolve this problem?

Thanks for the help in advance.

share|improve this question
You may get more responses and help with your problems, if you include any errors that you've received. –  thtsigma Mar 28 '13 at 3:57
There it was not errors, put it simple: it worked, until some changes on some *.coffee file (server) and stopped, from nowhere started to work again! :S –  Paulo Oliveira Apr 11 '13 at 15:21

1 Answer 1

It would be useful if you provided a error output/log and a cakefile.

Also you might want to look into using connect-assets. A good example of usage is in the express-coffee template.

share|improve this answer

Your Answer


