cahilfoley / react-snowfall

A high performance, canvas based react component that creates a snowfall effect
https://cahilfoley.github.io/react-snowfall/
MIT License
382 stars 21 forks source link

Library isn't working anymore #76

Closed tanveerjafri closed 1 week ago

tanveerjafri commented 4 months ago

I'm getting these errors. Any way to fix?

ERROR in ./src/Snowfall.jsx 14:35-43 export 'default' (imported as 'Snowfall') was not found in 'react-snowfall' (module has no exports) ERROR in ./node_modules/react-snowfall/lib/index.js 1:0-33 Module not found: Error: Can't resolve './SnowfallCanvas' in 'D:\react\snowfall-example\node_modules\react-snowfall\lib' Did you mean 'SnowfallCanvas.js'? BREAKING CHANGE: The request './SnowfallCanvas' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. ERROR in ./node_modules/react-snowfall/lib/index.js 2:0-27 Module not found: Error: Can't resolve './Snowfall' in 'D:\react\snowfall-example\node_modules\react-snowfall\lib' Did you mean 'Snowfall.js'? BREAKING CHANGE: The request './Snowfall' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.

Steviegt commented 1 month ago

I'm facing the same issue so I had to remove the library for now.. hoping there will be (or I find) a solution until it begins to snow outside :D

cahilfoley commented 1 week ago

Hey all, sorry for the delay in this, I'll take a look shortly and try to sort it out. Looks to be an ESM problem with missing the file extensions.