'Three.JS react-three-fibre vite build failed

i've been working a bit with ThreeJS but can't get it to build.
After some time put into this without any results whatsoever i wanted to ask if any of you know what's wrong.

Project: I made some basic gltf models using blender and want to display/ manipulate them later on. For now they are basically just displayed.

It works on the dev server but tsc returnes multiple errors.

Errors are for example:

  • type declarations not found (despite the needed @types dependencies beeing present)
  • type constraint violations in node_modules

What am i missing?

Disclaimer: I am new to both React and ThreeJS.

Repo Link



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source