ModuleNotFoundError 'tsparticles/Plugins/PolygonMask/Enums'
giacomoforlani opened this issue · 3 comments
Hi, I've encountered the following error when I build my project after update react-particles-js
to version 3.5.3
.
ModuleNotFoundError: Module not found: Error: Can't resolve 'tsparticles/Plugins/PolygonMask/Enums' in '/Users/giacomoforlani/Projects/paul/node_modules/react-particles-js/cjs'
> Build error occurred
Error: > Build failed because of webpack errors
at /Users/giacomoforlani/Projects/paul/node_modules/next/dist/build/index.js:15:924
at async Span.traceAsyncFn (/Users/giacomoforlani/Projects/paul/node_modules/next/dist/telemetry/trace/trace.js:6:584)
Here are my package.json dependencies:
"dependencies": {
"@u-wave/react-vimeo": "^0.9.4",
"aos": "^3.0.0-beta.6",
"framer-motion": "^4.1.17",
"gsap": "^3.7.0",
"next": "11.0.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-particles-js": "3.5.3"
},
"devDependencies": {
"@types/aos": "^3.0.3",
"@types/react": "17.0.13",
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.1",
"eslint": "^7.30.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-next": "^11.0.1",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"sass": "^1.35.1",
"typescript": "4.3.5"
}
I've resolved this by installing tsparticles
dev dependencies, so I think that is a problem related to peer dependencies.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have tried installing the tsparticles. But the issue still persist.
In the repo readme there's a deprecation notice here: https://github.com/wufe/react-particles-js#warning-deprecation-notice
You need to migrate to react-tsparticles
for having the latest updates.