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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:42:17+00:00 2026-06-08T15:42:17+00:00

I’ve been very frustrated with the Let’s build twitter node app at Chapter 2

  • 0

I’ve been very frustrated with the “Let’s build twitter” node app at Chapter 2 in the O’Reilly book “Node.js Up And Running”.

I’ve never used EJS and don’t even know what extension to put for EJS files. Plus, I can’t get my app working getting these various errors:

  • partial is not defined
  • Cannot find module ‘undefined’ where doing app.render(‘index’…
  • Cannot find module ‘ejs’
  • body is not defined

It’s even more frustrating since it’s only the Chapter 2 and I’m wondering if it wouldn’t be preferable to switch to another material…

  • 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-08T15:42:21+00:00Added an answer on June 8, 2026 at 3:42 pm

    If you too have been frustrated with the “Let’s build twitter” programming tutorial at the Chapter 2 in the O’Reilly Up and running book, here is the complement to make this “app” work.

    Pre-requisites:

    1. For this app to work, make sure you have a version of Express < 3.X. In fact, in version 3.0 and higher they removed the “partial” support and now is template specific. So make sure to install a version 2.x by doing so: npm install express@2.x
    2. The book doesn’t provide any information on how to use EJS files. After a bit of research, in order for express to understand and parse EJS file you have to install…ejs.
      The installation is pretty straightforward like any other module: npm install ejs.

    The meat:

    1. For this app, all the files in the folder views and partials should have the extension .ejs
    2. You installed EJS but you have to tell express to use EJS as the template format in the app.render() function
      You have two ways to do it:

    (1) You set EJS as the default template engine and then just tell express to render your file
    app.set('view engine', 'ejs');

    res.render('index', ...)

    (2) You just tell to the app.render() function to use EJS, express will take care of it

    res.render('index.ejs', ...)

    If at that point it doesn’t work or it’s still not clear, nothing is better than looking at working code. Fork or download the app here.

    Hope it helps other readers.

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

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am currently running into a problem where an element is coming back from

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.