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 trialNadine Schermerhorn
2,324 PointsGetting a 301 error
I have been getting a 301 error while doing the Node.js Basics. Happening on both my own editor and terminal as well as the workspace. I can't image you actually moved anything or the "chalkers"; however, I'm out of ideas. What else could be happening?
3 Answers
Leonardo Vidal
14,603 PointsI had the same issue, the way I solved it was using https instead of http.
var https = require("https");
var request= https.get("https://teamtreehouse.com/"+username+".json",function(response)
Leo Van Deuren
8,529 PointsYou need to change the http's in your program to https's should clear up the problem. It is because of a redirect that you are getting the 301 error.
Lanre TH
1,037 PointsThanks man it really helped
Michael Barakat
3,420 PointsMichael Barakat
3,420 Pointsthank you for posting this. it really helped.