skip to Main Content

I keep getting this error:

Cannot read properties of undefined (reading 'A')
TypeError: Cannot read properties of undefined (reading 'A')
    at ue (http://localhost:3000/static/js/bundle.js:49456:19)
    at xe (http://localhost:3000/static/js/bundle.js:49586:36)
    at Object.or [as jsx] (http://localhost:3000/static/js/bundle.js:49532:16)
    at http://localhost:3000/static/js/bundle.js:49909:32
    at renderWithHooks (http://localhost:3000/static/js/bundle.js:24280:22)
    at updateForwardRef (http://localhost:3000/static/js/bundle.js:27529:24)
    at beginWork (http://localhost:3000/static/js/bundle.js:29590:20)
    at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:14536:18)
    at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:14580:20)
    at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:14637:35)

All my code is:

import React from "react";
import Spline from "@splinetool/react-spline";

export default function App() {
  return (
    <div className="App">
      <Spline scene="https://prod.spline.design/o3v1HPnOwXUx88B6/scene.splinecode" />
    </div>
  );
}

and I’m getting that error, I’ve tried checking videos or even docs and found nothing. I’ve assured that the root of the problem is the because whenever I remove it out of the code, the web preview is back to normal.

2

Answers


  1. I have the same issue, I have installed @splinetool/runtime and @splinetool/react-spline, and import in my project like this :

    import React from "react";
    import Spline from '@splinetool/react-spline';
    
    export default function App() {
      return (
          <Spline scene="https://prod.spline.design/o3v1HPnOwXUx88B6/scene.splinecode" />
      );
    }
    
    Login or Signup to reply.
  2. Solution has been found for that :
    To resolve the "TypeError: Cannot read properties of undefined (reading ‘A’)" issue, update your dependencies to the following versions:
    "@splinetool/react-spline": "^2.2.6", "@splinetool/runtime": "^1.4.5"

    Update your package.json and run npm install or yarn install to apply the changes.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search