I can run it on Replit and locally, but tests fail, I can see it’s connected in the terminal when I give the link to the tester - I’ve used the exact code you gave me from Advanced Node and Express - I don’t know what I’m doing wrong.
Here are links to my github repo, and my replit, both are failing the tests. Please let me know what I am missing here, because I can’t figure it out.
I just reran the tests, here are the errors from the console that I’ve gotten, I’m going to look them up shortly and see what I can do to fix.
Access to fetch at 'http://localhost:3000/_api/package.json' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
VM6:4
GET http://localhost:3000/_api/package.json net::ERR_FAILED 200 (OK)
eval @ VM6:4
#a @ dom-test-evaluator.js:2
await in #a
handleMessage @ dom-test-evaluator.js:2
onmessage @ dom-test-evaluator.js:2
dom-test-evaluator.js:2 TypeError: Failed to fetch
at eval (eval at #a (dom-test-evaluator.js:2:254989), <anonymous>:4:21)
at #a (dom-test-evaluator.js:2:255335)
at async DOMTestEvaluator.handleMessage (dom-test-evaluator.js:2:256038)
#a @ dom-test-evaluator.js:2
await in #a
handleMessage @ dom-test-evaluator.js:2
onmessage @ dom-test-evaluator.js:2
about:srcdoc:1 Access to fetch at 'http://localhost:3000/_api/app' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
VM7:4
GET http://localhost:3000/_api/app net::ERR_FAILED 200 (OK)
eval @ VM7:4
#a @ dom-test-evaluator.js:2
await in #a
handleMessage @ dom-test-evaluator.js:2
onmessage @ dom-test-evaluator.js:2
dom-test-evaluator.js:2 TypeError: Failed to fetch
at eval (eval at #a (dom-test-evaluator.js:2:254989), <anonymous>:4:21)
at #a (dom-test-evaluator.js:2:255335)
at async DOMTestEvaluator.handleMessage (dom-test-evaluator.js:2:256038)
#a @ dom-test-evaluator.js:2
await in #a
handleMessage @ dom-test-evaluator.js:2
onmessage @ dom-test-evaluator.js:2
about:srcdoc:1 Access to fetch at 'http://localhost:3000/_api/app' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
VM8:4
GET http://localhost:3000/_api/app net::ERR_FAILED 200 (OK)
eval @ VM8:4
#a @ dom-test-evaluator.js:2
await in #a
handleMessage @ dom-test-evaluator.js:2
onmessage @ dom-test-evaluator.js:2
dom-test-evaluator.js:2 TypeError: Failed to fetch
at eval (eval at #a (dom-test-evaluator.js:2:254989), <anonymous>:4:21)
at #a (dom-test-evaluator.js:2:255335)
at async DOMTestEvaluator.handleMessage (dom-test-evaluator.js:2:256038)
#a @ dom-test-evaluator.js:2
await in #a
handleMessage @ dom-test-evaluator.js:2
onmessage @ dom-test-evaluator.js:2
about:srcdoc:1 Access to fetch at 'http://localhost:3000/' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
VM9:4
GET http://localhost:3000/ net::ERR_FAILED 200 (OK)
eval @ VM9:4
#a @ dom-test-evaluator.js:2
await in #a
handleMessage @ dom-test-evaluator.js:2
onmessage @ dom-test-evaluator.js:2
dom-test-evaluator.js:2 TypeError: Failed to fetch
at eval (eval at #a (dom-test-evaluator.js:2:254989), <anonymous>:4:21)
at #a (dom-test-evaluator.js:2:255335)
at async DOMTestEvaluator.handleMessage (dom-test-evaluator.js:2:256038)
#a @ dom-test-evaluator.js:2
await in #a
handleMessage @ dom-test-evaluator.js:2
onmessage @ dom-test-evaluator.js:2
about:srcdoc:1 Access to fetch at 'http://localhost:3000/' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
VM10:4
GET http://localhost:3000/ net::ERR_FAILED 200 (OK)
eval @ VM10:4
#a @ dom-test-evaluator.js:2
await in #a
handleMessage @ dom-test-evaluator.js:2
onmessage @ dom-test-evaluator.js:2
dom-test-evaluator.js:2 TypeError: Failed to fetch
at eval (eval at #a (dom-test-evaluator.js:2:254989), <anonymous>:4:21)
at #a (dom-test-evaluator.js:2:255335)
at async DOMTestEvaluator.handleMessage (dom-test-evaluator.js:2:256038)