react-particles-js crashed after introduce typescript
xgqfrms opened this issue ยท 5 comments
xgqfrms commented
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'
xgqfrms commented
CJS not support bug ?
xgqfrms commented
not work โ
$ cd ./node_modules/react-particles-js
$ yarn add -D tsparticles
$ cd ./node_modules/react-particles-js
xgqfrms commented
solution โ
- upgrade npm package to latest version
$ yarn add react-particles-js@latest
- install dependency npm package
$ yarn add -D tsparticles@latest
xgqfrms commented
matteobruni commented
solution โ
- upgrade npm package to latest version
$ yarn add react-particles-js@latest
- 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.