Hi,
Update: I tried out solution I found on post APIs and Microservices Certification: test with Repl.it URL does not work
So, I clicked on the link, typed npm install and hit run. Yes, I see another url, the one that is suggested.
I still wasn’t passing the tests. I hit STOP and then RUN again, and I got through!
I cannot pass the test. I had already made an account on replit for python and did two python exercises there. All works
I think I’ve added the author and name correctly in the json file but I just cannot pass. I’ve tried it in google chrome.
{
"name": "fcc-learn-npm-package-json",
"author": "Karin Meersman",
"dependencies": {
"express": "^4.14.0"
},
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"repository": {
"type": "git",
"url": "https://idontknow/todo.git"
}
}
In the console I see this:
Access to XMLHttpRequest at 'https://repl.it/@karinmeersman/myFirstNodeProject/_api/package.json' from origin 'https://www.freecodecamp.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
jquery.js:10099 GET https://repl.it/@karinmeersman/myFirstNodeProject/_api/package.json net::ERR_FAILED
frame-runner.js:100 Error
at Object.eval (eval at <anonymous> (frame-runner.js:84), <anonymous>:8:13)
at l (jquery.js:3762)
at c (jquery.js:3830)
When I hit the button and had my devtools open, I noticed that I hung on a promise in frame.js starting on line 52. So, am I timing out? I get the response back really fast. I think the promise is rejected.
export const runTestInTestFrame = async function(document, test, timeout) {
const { contentDocument: frame } = document.getElementById(testId);
return await Promise.race([
new Promise((_, reject) => setTimeout(() => reject('timeout'), timeout)),
frame.__runTest(test)
]);
};
So what do I do now? There are no adblockers, facebook containers or anything in the google chrome I’m running.
Thank you and greetings,
Karin