tholman / cursor-effects

Old-school cursor effects for your browser built with modern JavaScript
https://tholman.com/cursor-effects
3.35k stars 246 forks source link

Uncaught TypeError: Cannot read properties of null (reading 'appendChild') #28

Closed twiclo closed 2 years ago

twiclo commented 2 years ago
<html>
 <link href='https://fonts.googleapis.com/css?family=Mountains of Christmas' rel='stylesheet'>
 <script src="https://unpkg.com/cursor-effects@latest/dist/browser.js"></script>  
 <script> 
   new cursoreffects.snowflakeCursor();
 </script>

There's the top of my web page. I'm getting the following error:

Uncaught TypeError: Cannot read properties of null (reading 'appendChild')
    at new t.snowflakeCursor (browser.js:1:17588)
    at (index):6:3

Please let me know if I'm missing anything

CristiMacovei commented 2 years ago

Hey there! The issue you're having is related to the structure of your HTML. The library is trying to inject a component into the document's body (the thing), which is non-existent in your code. Also, another issue is you have to place the Githubissues.

  • Githubissues is a development platform for aggregating issues.