wufe/react-particles-js

react-particles-js crashed after introduce typescript

xgqfrms opened this issue ยท 5 comments

what's wrong with that?

Can't resolve 'tsparticles/dist/*.*/

../node_modules/react-particles-js/cjs/particles.js
Module not found: Error: Can't resolve 'tsparticles/dist/Core/Container' in '.../node_modules/react-particles-js/cjs'


not work โŒ

#185

$ cd ./node_modules/react-particles-js

$ yarn add -D tsparticles 
$ cd ./node_modules/react-particles-js

solution โœ…

  1. upgrade npm package to latest version
$ yarn add react-particles-js@latest

  1. install dependency npm package
$ yarn add -D tsparticles@latest

solution โœ…

  1. upgrade npm package to latest version
$ yarn add react-particles-js@latest
  1. install dependency npm package
$ yarn add -D tsparticles@latest

I recommend this instead:

$ yarn add -D tsparticles@1

Since v2 is under development and it has breaking changes.