Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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 15,136 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.

1 Answer

Ryli Davis
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Ryli Davis
Full Stack JavaScript Techdegree Graduate 15,136 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