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

  • Home
  • SEARCH
  • 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 8291579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:10:44+00:00 2026-06-08T13:10:44+00:00

edited for the ilollar answer(same problem) i have app.coffee : pp.configure -> publicDir =

  • 0

edited for the ilollar answer(same problem)
i have app.coffee :

pp.configure ->
  publicDir = "#{__dirname}/public"

app.set "views", viewsDir
app.set "view engine", "jade"

app.use(stylus.middleware debug: true, src: viewsDir, dest: publicDir, compile: compileMethod)
app.use(express.static(publicDir))

compileMethod = (str, path) ->
  stylus(str)
    .set('filename', path)
    .set('compress', true)


app.get "/pag",(req,res) ->
  res.render "pag",
  title: "test",

in /stylesheet/pag.jade:

...
link(rel='stylesheet', href='pag/css/bootstrap.min.css')
...

when im go to “myserver:9090/pag” the page not load the bootstrap.min.css.
i get the following error:

source :(my folder of proyects)/views/pag/css/bootstrap.min.styl
dest : (my folder of proyects)/public/pag/css/bootstrap.min.css
read : (my folder of proyects)/views/pag/css/bootstrap.min.styl
Error: ENOENT, open '(my folder)/views/pag/css/bootstrap.min.styl'

Where am i wrong? i am probably missing something.. any ideas?

  • 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-08T13:10:48+00:00Added an answer on June 8, 2026 at 1:10 pm

    First, if you haven’t set up ExpressJS to serve static files, you’ll want to do that:

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

    Then, remove the “public” from your stylesheet call:

    link(rel='stylesheet', href='/pag/css/bootstrap.min.css')

    You’re setting “public” as the app root directory that static files are being served from, so there’s no need to specify “public” in your call – “public” is now the root.

    Update:
    What is your viewsDir set to? Since you’ve set the Stylus middleware’s source to that directory, that’s where it is looking for the styl to render.

    You’re setting “public” as the destination directory – if you include “public” in the call, it’ll just make another public directory under public, which isn’t what you want.

    Try reorganizing the stylesheets in the project to something like this:

    /stylesheets
      /pag
        /css
          bootstrap.min.styl
    

    Then change your middleware to this:

    app.use(stylus.middleware debug:true, src:'/stylesheets', dest: publicDir, compile: compileMethod)

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

Sidebar

Related Questions

(edited to give a better description of the answer I gave) I have created
EDITED QUESTION Hi this is the total workflow of this project we have a
Edited: (after seeing Luke's answer) I'm looking to develop a website and all the
Edited the question due to progressive insights :-) I am creating an app that
EDITED for clarity: I have 2 ListView i my application. The first one contains
EDITED : The problem is with the function 'find_callback', I want to insert each
[edited] I am trying to make a script that downloads a file, the problem
Edited because I'm a moron. Should have said class originally. I have the code
[EDITED] I am connecting to SQL Server 2005. i have configured the certificate on
EDITED because question is about same program. I'm trying to take the top fifty

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.