Hello,
I'm trying to display spine animation on ReactJS project using runtime NPM. I found @esotericsoftware/spine-player, but after installing it my site can't load anymore and get the following error (I wonder if spine player automatically imports a 3D related module during loading?)
TypeError: Vector3 is not a constructor
What I have tried:
- Search for related errors but got no results
- Delete node_modules and reinstall but the problem is still there unless I remove spine player npm.
Here are the dependencies and versions I am using.
"dependencies": {
"@emotion/react": "11.13.3",
"@emotion/styled": "11.13.0",
"@esotericsoftware/spine-phaser": "4.2.62",
"@esotericsoftware/spine-player": "4.2.18",
"@fontsource-variable/quicksand": "5.1.0",
"@mui/icons-material": "6.0.2",
"@mui/material": "6.0.2",
"@reduxjs/toolkit": "2.2.7",
"axios": "1.7.7",
"formik": "2.4.6",
"framer-motion": "11.5.4",
"i18next": "24.2.3",
"i18next-browser-languagedetector": "8.0.4",
"i18next-http-backend": "3.0.2",
"notistack": "3.0.1",
"phaser": "3.88.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-i18next": "15.4.1",
"react-redux": "9.1.2",
"react-router-dom": "6.26.2",
"react-slick": "0.30.2",
"react-zoom-pan-pinch": "3.7.0",
"slick-carousel": "1.8.1",
"socket.io-client": "4.8.0",
"yup": "1.4.0"
},
"devDependencies": {
"@eslint/js": "9.9.0",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@types/react-slick": "0.23.13",
"@vitejs/plugin-react": "4.3.1",
"eslint": "9.9.0",
"eslint-plugin-react-hooks": "5.1.0-rc.0",
"eslint-plugin-react-refresh": "0.4.9",
"globals": "15.9.0",
"typescript": "5.5.3",
"typescript-eslint": "8.0.1",
"vite": "5.4.1"
}
Thank you in advance!