I want to use react-spring package in react project, but I am facing this error. But when I am using same code in stackblitz it is working without any problem. Could you please help me with this problem?
Version: 1.75.1 (user setup)
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:32:34.589Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No
I am trying to use this animation library in my project though it is working in stackblitz not working in my pc.
My package.json file:
{
"name": "toast-notification",
"version": "0.1.0",
"private": true,
"dependencies": {
"@heroicons/react": "^2.0.13",
"@react-spring/web": "^9.7.0",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^13.0.0",
"@testing-library/user-event": "^13.2.1",
"axios": "^1.2.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.6.2",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.0"
},
"scripts": {
"start": "set port=3010 && react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.5.2",
"@tailwindcss/line-clamp": "^0.4.0",
"@tailwindcss/typography": "^0.5.2",
"sass": "^1.57.1",
"tailwindcss": "^3.2.4"
}
}
3
Answers
okay from react-spring github discussion I got this feedback from joshuaellis github discussion link
He suggested to use 9.6.1 for now till the fix the bug occurring for webpack update of ECMA script.
First remove "@react-spring/web": "^9.7.0" from your package.json
yarn add @react-spring/web
yarn
yarn run start
There was an issue in
9.7.0
, this has been solved in9.7.1
try to upgrade to that version.