Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Node.js Basics Building a Command Line Application Requesting data with https

Ryli Davis
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Ryli Davis
Full Stack JavaScript Techdegree Graduate 14,439 Points

Getting node.js error code 'SELF_SIGNED_CERT_IN_CHAIN' when typing ' node app.js ' in terminal.

I have all the correct code written in the video. Please see below

const https = require("https");
function getProfile() {
  const request = https.get(
    "https://teamtreehouse.com/profiles/rylidavis.json",
    (response) => {
      console.dir(response);
    }
  );
}
getProfile(); 

I am unsure what the node.js error means and how to resolve so I can see the json response. I appreciate the help. Thanks in advance.

Ryli Davis
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Ryli Davis
Full Stack JavaScript Techdegree Graduate 14,439 Points

I figured it out. It was simply I did not have the code program installed in vs code. I just had to search "install command" and it found this option " Shell Command: Install 'code' command in PATH "and after I ran that I was able to type ' node app.js' and see the correct results! yay