Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Yiling Lin
    Yiling Lin
    4,690 Points

    error message

    Posted January 19, 2022 11:01am by Yiling Lin
    Yiling Lin
    4,690 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    2 Answers

  • Cheryl Chao
    Cheryl Chao
    5,555 Points

    Why TypeError: undefined is not a function

    Posted March 9, 2021 5:13am by Cheryl Chao
    Cheryl Chao
    5,555 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

  • Tomasz Grodzki
    Tomasz Grodzki
    8,130 Points

    How to make the function that shows specified areas points?

    Posted May 26, 2020 2:01pm by Tomasz Grodzki
    Tomasz Grodzki
    8,130 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

  • polentz
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    polentz
    Full Stack JavaScript Techdegree Student 11,755 Points

    module.exports and require clarification

    Posted August 26, 2019 1:38pm by polentz
    .a{fill-rule:evenodd;}techdegree
    polentz
    Full Stack JavaScript Techdegree Student 11,755 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

  • Nick Ghys
    Nick Ghys
    8,918 Points

    If the function was called getProfile and we do module.exports.get = getProfile, the API is still get. Explanation?

    Posted May 19, 2019 12:42pm by Nick Ghys
    Nick Ghys
    8,918 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

  • Vitaly Khe
    Vitaly Khe
    7,160 Points

    How about namespaces isolation when using more modules?

    Posted March 10, 2019 6:38pm by Vitaly Khe
    Vitaly Khe
    7,160 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    0 Answers

  • Kevin Gates
    Kevin Gates
    15,055 Points

    I get an undefined error first, then I get the proper response (200) right afterward. Any ideas as to why?

    Posted February 11, 2019 2:19pm by Kevin Gates
    Kevin Gates
    15,055 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

  • Michael Williams
    PLUS
    Michael Williams
    Courses Plus Student 8,059 Points

    This video went waaaaaaaay over my head. Can someone explain it to me like I'm 5? Or 3, even?

    Posted January 23, 2019 4:05am by Michael Williams
    Michael Williams
    Courses Plus Student 8,059 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    4 Answers

  • Michael Pashkov
    Michael Pashkov
    22,024 Points

    Hi, did not get - get. Why get and not get()?

    Posted October 30, 2018 6:20pm by Michael Pashkov
    Michael Pashkov
    22,024 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    2 Answers

  • Peter Retvari
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points

    Could you someone explain this part of the code: module.exports.get = get;?

    Posted October 27, 2018 8:56pm by Peter Retvari
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    2 Answers

  • Teacher Russell
    Teacher Russell
    16,873 Points

    organizing your code with require

    Posted July 26, 2018 12:55pm by Teacher Russell
    Teacher Russell
    16,873 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    4 Answers

  • Nadav Reis
    Nadav Reis
    5,561 Points

    Trying to export the printMessage function. I am doing something wrong. Help please!

    Posted April 8, 2018 4:37pm by Nadav Reis
    Nadav Reis
    5,561 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    3 Answers

  • Jesse Thompson
    Jesse Thompson
    10,684 Points

    Little confused with how users.forEach(profile.get); grabs users for get function

    Posted March 29, 2018 9:38pm by Jesse Thompson
    Jesse Thompson
    10,684 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

  • Przemyslaw Mazur
    PLUS
    Przemyslaw Mazur
    Courses Plus Student 9,296 Points

    Don't know how to pass two different arguments to the command line.

    Posted March 6, 2018 7:31pm by Przemyslaw Mazur
    Przemyslaw Mazur
    Courses Plus Student 9,296 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    2 Answers

  • Brian Patterson
    Brian Patterson
    19,588 Points

    node not responding.

    Posted February 20, 2018 9:01pm by Brian Patterson
    Brian Patterson
    19,588 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

  • shirshah sahel
    shirshah sahel
    10,035 Points

    I'm having a little trouble with organizing my code with require.

    Posted October 12, 2017 6:12pm by shirshah sahel
    shirshah sahel
    10,035 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    4 Answers

  • Neil McPartlin
    Neil McPartlin
    14,662 Points

    'Data type' problem when querying a JSON object

    Posted October 6, 2017 11:37am by Neil McPartlin
    Neil McPartlin
    14,662 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    3 Answers

  • nico dev
    nico dev
    20,364 Points

    Is there a way to avoid countless HTTP requests when using many files that require each other?

    Posted September 6, 2017 7:20am by nico dev
    nico dev
    20,364 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

  • cyber voyager
    cyber voyager
    8,859 Points

    Why is he exporting only a part of the code?

    Posted June 19, 2017 11:16pm by cyber voyager
    cyber voyager
    8,859 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    2 Answers

  • cyber voyager
    cyber voyager
    8,859 Points

    I don't understand why we exported only the get function

    Posted June 18, 2017 7:19pm by cyber voyager
    cyber voyager
    8,859 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

  • Mezzo Forte
    Mezzo Forte
    1,877 Points

    how to access more then one function

    Posted April 22, 2017 6:53am by Mezzo Forte
    Mezzo Forte
    1,877 Points
    • JavaScript
    • Node.js Basics 2017
    • Handling Errors in Node
    • Organizing Your Code with require

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord