question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug(curriculum): Advanced Node Challenges fail when using localhost for url

See original GitHub issue

Not sure if this will actually be a bug once we go to production, but I noticed if I use http://localhost:3001 (my local running version of the first challenge in the Advanced Node Challenges, none of the tests pass and there are several errors in the console. This also happens when I run everything locally.

Using the same url on the current production site for the same challenge does not fail any of the tests.

I have validated the solution is correct.

image

image

This is annoying if you are trying to make changes to a challenge to validate the tests are working as they should (without having to run npm run:test:curriculum) after every code change while working on challenge tests.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Bounceycommented, Sep 10, 2019

Don’t be so hard on yourself @raisedadead. It is as @RandellDawson guessed. The CORS in the boilerplate is where the error is coming from.

Currently the boilerplate only excepts requests from *.freecodecamp.org domains, hence the CORS error when on .dev or running the learn platform locally.

In short, not a blocker for the next release.

For developing the challenges locally, update the cors in the boilerplate to accept /https?:\/\/localhost(:\d*)?/

0reactions
RandellDawsoncommented, Mar 5, 2020

@raisedadead Should we close this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebSocket connection to 'ws://localhost:3000/ws' failed: #11779
Error message here. WebSocket connection to 'ws://localhost:3000/ws' failed: If I use port 3000 the error disappears, but nothing works.
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... Bug:80085 - "emerge gettext-0.12.1-r2 fails with sandbox because of weird filesystem setup" status:RESOLVED resolution:OBSOLETE severity:normal ...
Read more >
Node.js CRUD Operations Using Mongoose and MongoDB ...
In Postman, we make a new GET request with the URL localhost:3000/api/findall and hit send. It makes our HTTP GET request and returns ......
Read more >
Troubleshooting Connection Issues to Neo4j
The error literally means that the address is unreachable, meaning you've provided some IP address probably where it can't get packets to/from this....
Read more >
Test and debug with the Emulator - Azure Bot Service
In this article. Prerequisites; Run a bot locally; Connect to a bot running on localhost; View detailed Message Activities with the Inspector ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found