Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8848365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:24:26+00:00 2026-06-14T12:24:26+00:00

I was originally super frustrated when trying to set up Stylus, because I would

  • 0

I was originally super frustrated when trying to set up Stylus, because I would adjust my src and dest settings, , restart Node, refresh, and Stylus wasn’t compiling. This was on a page like http://localhost:3000/tasks. However, the src and dest paths were correct, and when I would restart Node and try to load the index page, http://localhost:3000, Stylus would then compile correctly.

So now that I’ve figured out that it’s compiling properly, but only from the home URL, I’m wondering if I have something set up wrong, because any changes to .styl files are not being updated until I refresh from the home page, not any GET parameter page.

var express = require('express');
var app = express();
var stylus = require('stylus');

app.configure(function () {
    this.set("views", __dirname + "/views/jade");
    this.set("view engine", "jade");
    this.use(express.bodyParser());
    this.use(express.methodOverride());
    this.use(this.router);

    this.use(stylus.middleware({
        src: __dirname + '/views/styl', //styl files to be compiled
        dest: __dirname + '/public/css', //destination for compiled css
        compress: true
    }));

    this.use(express.static(__dirname + '/public'));
});

Is what I’m describing the normal process, or should Stylus recompile no matter what your URL is if it notices changes in a .styl file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T12:24:27+00:00Added an answer on June 14, 2026 at 12:24 pm

    I ended up going with the default Stylus path, meaning using a directory called “stylesheets” in both my “views” and “public” directory, and the following code:

        //Stylus
        this.use(stylus.middleware({
            src: __dirname + '/views', //styl files to be compiled
            dest: __dirname + '/public', //destination for compiled css
            compress: true
        }));
    

    Stylus then looked for .styl files in /views/stylesheets, and compiled them to /public/stylesheets. For some reason, trying to change the name of the directories and being fancy with my paths got me into trouble. Judging from reading some of the forums, this seems to be not considered a bug at this time, but there it is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Originally I was populating my NSTableView via an outlet and had set the dataSource
I originally asked this question on Super User but was told that it might
So I've got this super long query that I've been debugging. I originally received
Originally I had a design problem where I needed five subclasses of a superclass,
Originally I had two tables in my DB, [Property] and [Employee]. Each employee can
Originally posted on Server Fault , where it was suggested this question might better
Originally, I just want to verify that session_start locks on session. So, I create
I originally installed a recent version of wamp (php 5.3) but I need to
I originally started this question in another thread, but that thread was sorta, kinda
I originally setup some conditions using CGRectIntersectsRect for some collision detection which worked fine.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.