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 7656275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:43:29+00:00 2026-05-31T12:43:29+00:00

I am new to node.js and I’m just trying to learn how to use

  • 0

I am new to node.js and I’m just trying to learn how to use Express and Jade. It seems that this line in jade.js is causing some kind of problem: window.jade = require("jade");

I can start up my server just fine, but when I visit it in my browser I get this error:

ReferenceError: window is not defined
    at C:\Users\User\Desktop\node-js-web\node_modules\jade\jade.js:3142:1
    at Object.<anonymous> (C:\Users\User\Desktop\node-js-web\node_modules\jade\jade.js:3143:2)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Module.require (module.js:354:17)
    at require (module.js:370:17)
    at Object.<anonymous> (C:\Users\User\Desktop\node-js-web\node_modules\jade\index.js:4:5)
    at Module._compile (module.js:441:26)

When I comment out that line I get this error instead:

TypeError: Object #<Object> has no method 'compile'
    at Function.compile (C:\Users\User\Desktop\node-js-web\node_modules\express\lib\view.js:68:33)
    at ServerResponse._render (C:\Users\User\Desktop\node-js-web\node_modules\express\lib\view.js:417:18)
    at ServerResponse.render (C:\Users\User\Desktop\node-js-web\node_modules\express\lib\view.js:318:17)
    at C:\Users\User\Desktop\node-js-web\server.js:37:7
    at callbacks (C:\Users\User\Desktop\node-js-web\node_modules\express\lib\router\index.js:272:11)
    at param (C:\Users\User\Desktop\node-js-web\node_modules\express\lib\router\index.js:246:11)
    at pass (C:\Users\User\Desktop\node-js-web\node_modules\express\lib\router\index.js:253:5)
    at Router._dispatch (C:\Users\User\Desktop\node-js-web\node_modules\express\lib\router\index.js:280:4)
    at Object.handle (C:\Users\User\Desktop\node-js-web\node_modules\express\lib\router\index.js:45:10)
    at next (C:\Users\User\Desktop\node-js-web\node_modules\express\node_modules\connect\lib\http.js:203:15)

I really don’t know what to do here. Can anyone help?

  • 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-05-31T12:43:31+00:00Added an answer on May 31, 2026 at 12:43 pm

    There is no window object in Node.js because it’s not in a browser. If you want to attach jade to the global scope, use global.

    (But why do you want to make the variable global to your application, anyways? Only Express needs the jade object to render your views.)

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

Sidebar

Related Questions

I am trying to create a new node type like this: http://www.live-wtr.ru/leo/Tikz9.png but don't
I am trying to create a new node that is a child of an
I want to create new node of BeanTreeView, and when I add some node
I'm trying to add a new node to an jQuery SimpleTree , but all
I use JTree with TreeNode which extending DefaultMutableTreeNode.when I add new node,i cant update
I'm trying to make a simple custom field field_book_year for the new node type
I'm trying to insert a node in a linked list so that the nodes
I have a list like this: List<Node> nodes = new List<Node>(); Node s =
I use libcloud to create a new node instance Amazon EC2. conn.create_node returns me
I am trying to programmatically add a new XLink node to an XDocument but

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.