How do I use the CDN to run my tests?

Hi all,
I’m trying to do the HTML/CSS projects (e.g., tribute page) inside of VSCode using Google Chrome to view the page. So I have this tag:

<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
in my html.

However when go to Chrome to view it, I don’t see anything. Dev Tools shows this error in the console:

Uncaught TypeError: Cannot read property 'appendChild' of null
    at Module.<anonymous> (bundle.js:657)
    at r (bundle.js:1)
    at bundle.js:1
    at bundle.js:1

Any ideas?

Thanks!

Place the script right before the closing body tag. It doesn’t run correctly when placed in the head element because it requires the HTML to be loaded.

When you view your page you’ll see a hamburger menu in the upper left. Select the appropriate test suite and run the test.
If any tests fail, click the red button to see which test(s) are failing and text to help you correct the issue.

1 Like

Ah! I got it now. Thank you so much!!

Thanks, Roma !! Now it works.

1 Like