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.

[4.1.0] TypeError: Cannot read property 'appendChild' of null

See original GitHub issue

Hi!

I have copied this code …

<script src="https://unpkg.com/magic-snowflakes/dist/snowflakes.min.js"></script>
<script>
    var sf = new Snowflakes({
        color: "#fffee8",
        rotation: false,
        minSize: 18,
        maxSize: 31
    });
</script>

… from the bottom of https://hcodes.github.io/demo-snowflakes/ into the very end of <head>...</head>. I get this error on the JS console in Chromium:

snowflakes.min.js:formatted:151 Uncaught TypeError: Cannot read property 'appendChild' of null
    at new l (snowflakes.min.js:formatted:151)
    at new <anonymous> (snowflakes.min.js:formatted:262)
    at ?next=/:25

That ?next=/ is from the URL where the code is served, i.e. http://127.0.0.1:58000/login/?next=/.

Is this a bug or do I need to make changes on my end?

Thanks and best, Sebastian

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'appendChild' of null
The "Cannot read property 'appendChild' of null" error occurs for 2 reasons: Calling the appendChild() method on a DOM element that doesn't ...
Read more >
TypeError: Cannot read property 'appendChild' of Null in JS
The "Cannot read property 'appendChild' of null" error occurs when trying to call the appendChild method on a DOM element that doesn't exist....
Read more >
Cannot read property 'appendChild' of null from basic ... - GitHub
Hi, I'm getting this runtime error when selecting a result from the typeahead dropdown: Uncaught (in promise) TypeError: Cannot read ...
Read more >
Cannot read properties of null (reading 'appendChild ... - Reddit
It means your variable main is null, and therefore it has no property by the name appendChild . It's effecively trying to do...
Read more >
cannot read properties of null (reading 'children') - You.com
The "Cannot read property 'children' of null" error occurs when accessing the children property on a null value. To solve the error, make...
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