Closed victorli closed 2 years ago
next is my package.json
{ "private": true, "author": "victorli luckylzs@gmail.com", "scripts": { "dev": "umi dev", "build": "umi build", "postinstall": "umi setup", "setup": "umi setup", "start": "npm run dev" }, "dependencies": { "@react-three/drei": "^9.17.1", "@react-three/fiber": "^8.2.0", "@splinetool/loader": "^0.9.79", "@splinetool/r3f-spline": "^1.0.1", "@tweenjs/tween.js": "^18.6.4", "@types/three": "^0.141.0", "lodash": "^4.17.21", "three": "^0.142.0", "umi": "^4.0.7" }, "devDependencies": { "@types/lodash": "^4.14.182", "@types/react": "^18.0.0", "@types/react-dom": "^18.0.0", "typescript": "^4.1.2" } }
You have to match the @splinetool/loader
version that the demo has, the version must be 0.9.73
.
If you want to use the latest version of the loader, you have to export the scene again.
Fixed in @splinetool/loader
version 0.9.82
. You can update it to latest and the error won't be there anymore.
Uncaught Could not load /static/scroll.300ac701.splinecode: Cannot convert undefined or null to object
Actually, i have loaded the splinecode file successfully, but the hook
useSpline
throw the up exception. the splinecode file downloaded from the example