Test suite doesn't appear

Hi,
I’m coding the d3 projects and I prefer to use Atom instead of CodePen when developing. I included the CDN link in my code, but the test suite doesn’t seem to appear.
In the <head> of my html I have:

<script src =“https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js”></script>

In the console, I see this error message:

Uncaught TypeError: document.body is null
FCC_Global https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:657
r https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1
FCC_Global https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1
https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1
[bundle.js:657:212919](https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js)
FCC_Global https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:657
r https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1
FCC_Global https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1
https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1

Anybody know what’s up? Thanks!

Hello there,

The script needs to be defined after the content of your HTML. Also, in order to test the script, your webpage (HTML/CSS and JS) needs to be served by a server - this can be achieved with extensions and libraries like live-server.

Hope this clarifies

1 Like

Thanks Sky!
Moving the <script> tag to the bottom fixed it, even though I’m just opening the page in my own browser, not using a server extension/library.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.