0

I have forked a repo to here: https://github.com/unegma/react-three-fpscontrols

and am trying to convert the package to use typescript..

The error I keep getting is: TypeError: three_1.Vector3 is not a constructor

which is occurring on this line here: https://github.com/unegma/react-three-fpscontrols/blob/c89176ab5ce71e8e89332c088047ff85f804306e/src/FPSControls.tsx#L11

Checking the 'three' object in my console shows this: /static/media/three.c679b86df6ce78a00d67.cjs

instead of an Object containing Vector3, which leads me to think I'm doing the import of the import incorrectly.

I've tried including the @types/three in the dev dependencies, and the dependencies, and the peer dependencies, but nothing seems to work. Any clues?

timhc22
  • 7,213
  • 8
  • 48
  • 66

0 Answers0