Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple TypeScript errors in @react-three/fiber seemingly not being aligned to @types/three #3038

Closed
lukehesluke opened this issue Oct 11, 2023 · 3 comments · Fixed by #3052
Labels
bug Something isn't working Typescript issues to do with TS

Comments

@lukehesluke
Copy link

Hi, in my project I have the (at present) latest versions of three, @types/three, @react-three/fiber. If I run npx tsc, I get a number of errors from @react-three/fiber. These errors all seem to indicate that there is a misalignment with the @types/three project. Maybe something changed on that project? The errors are:

node_modules/@react-three/fiber/dist/declarations/src/core/index.d.ts:14:187 - error TS2694: Namespace '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member 'XRFrame'.

14 declare const invalidate: (state?: RootState | undefined, frames?: number) => void, advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState | undefined, frame?: THREE.XRFrame | undefined) => void;
                                                                                                                                                                                             ~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/core/loop.d.ts:13:107 - error TS2694: Namespace '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member 'XRFrame'.

13     advance: (timestamp: number, runGlobalEffects?: boolean, state?: RootState | undefined, frame?: THREE.XRFrame | undefined) => void;
                                                                                                             ~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/core/store.d.ts:31:86 - error TS2694: Namespace '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member 'XRFrame'.

31 export declare type RenderCallback = (state: RootState, delta: number, frame?: THREE.XRFrame) => void;
                                                                                        ~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/core/store.d.ts:94:225 - error TS2694: Namespace '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member 'XRFrame'.

94 declare const createStore: (invalidate: (state?: RootState | undefined, frames?: number | undefined) => void, advance: (timestamp: number, runGlobalEffects?: boolean | undefined, state?: RootState | undefined, frame?: THREE.XRFrame | undefined) => void) => UseBoundStore<RootState>;
                                                                                                                                                                                                                                   ~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:70:71 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'BoxBufferGeometry'. Did you mean 'BufferGeometry'?

70 export declare type BoxBufferGeometryProps = BufferGeometryNode<THREE.BoxBufferGeometry, typeof THREE.BoxBufferGeometry>;
                                                                         ~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:70:103 - error TS2551: Property 'BoxBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

70 export declare type BoxBufferGeometryProps = BufferGeometryNode<THREE.BoxBufferGeometry, typeof THREE.BoxBufferGeometry>;
                                                                                                         ~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:71:74 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'CircleBufferGeometry'. Did you mean 'BufferGeometry'?

71 export declare type CircleBufferGeometryProps = BufferGeometryNode<THREE.CircleBufferGeometry, typeof THREE.CircleBufferGeometry>;
                                                                            ~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:71:109 - error TS2551: Property 'CircleBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

71 export declare type CircleBufferGeometryProps = BufferGeometryNode<THREE.CircleBufferGeometry, typeof THREE.CircleBufferGeometry>;
                                                                                                               ~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:72:72 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'ConeBufferGeometry'. Did you mean 'BufferGeometry'?

72 export declare type ConeBufferGeometryProps = BufferGeometryNode<THREE.ConeBufferGeometry, typeof THREE.ConeBufferGeometry>;
                                                                          ~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:72:105 - error TS2551: Property 'ConeBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

72 export declare type ConeBufferGeometryProps = BufferGeometryNode<THREE.ConeBufferGeometry, typeof THREE.ConeBufferGeometry>;
                                                                                                           ~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:73:76 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'CylinderBufferGeometry'. Did you mean 'CylinderGeometry'?

73 export declare type CylinderBufferGeometryProps = BufferGeometryNode<THREE.CylinderBufferGeometry, typeof THREE.CylinderBufferGeometry>;
                                                                              ~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:73:113 - error TS2551: Property 'CylinderBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'CylinderGeometry'?

73 export declare type CylinderBufferGeometryProps = BufferGeometryNode<THREE.CylinderBufferGeometry, typeof THREE.CylinderBufferGeometry>;
                                                                                                                   ~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/geometries/CylinderGeometry.d.ts:17:14
    17 export class CylinderGeometry extends BufferGeometry {
                    ~~~~~~~~~~~~~~~~
    'CylinderGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:74:80 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'DodecahedronBufferGeometry'. Did you mean 'DodecahedronGeometry'?

74 export declare type DodecahedronBufferGeometryProps = BufferGeometryNode<THREE.DodecahedronBufferGeometry, typeof THREE.DodecahedronBufferGeometry>;
                                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:74:121 - error TS2551: Property 'DodecahedronBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'DodecahedronGeometry'?

74 export declare type DodecahedronBufferGeometryProps = BufferGeometryNode<THREE.DodecahedronBufferGeometry, typeof THREE.DodecahedronBufferGeometry>;
                                                                                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/geometries/DodecahedronGeometry.d.ts:8:14
    8 export class DodecahedronGeometry extends PolyhedronGeometry {
                   ~~~~~~~~~~~~~~~~~~~~
    'DodecahedronGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:75:75 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'ExtrudeBufferGeometry'. Did you mean 'ExtrudeGeometry'?

75 export declare type ExtrudeBufferGeometryProps = BufferGeometryNode<THREE.ExtrudeBufferGeometry, typeof THREE.ExtrudeBufferGeometry>;
                                                                             ~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:75:111 - error TS2551: Property 'ExtrudeBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'ExtrudeGeometry'?

75 export declare type ExtrudeBufferGeometryProps = BufferGeometryNode<THREE.ExtrudeBufferGeometry, typeof THREE.ExtrudeBufferGeometry>;
                                                                                                                 ~~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/geometries/ExtrudeGeometry.d.ts:124:14
    124 export class ExtrudeGeometry extends BufferGeometry {
                     ~~~~~~~~~~~~~~~
    'ExtrudeGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:76:79 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'IcosahedronBufferGeometry'. Did you mean 'IcosahedronGeometry'?

76 export declare type IcosahedronBufferGeometryProps = BufferGeometryNode<THREE.IcosahedronBufferGeometry, typeof THREE.IcosahedronBufferGeometry>;
                                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:76:119 - error TS2551: Property 'IcosahedronBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'IcosahedronGeometry'?

76 export declare type IcosahedronBufferGeometryProps = BufferGeometryNode<THREE.IcosahedronBufferGeometry, typeof THREE.IcosahedronBufferGeometry>;
                                                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/geometries/IcosahedronGeometry.d.ts:8:14
    8 export class IcosahedronGeometry extends PolyhedronGeometry {
                   ~~~~~~~~~~~~~~~~~~~
    'IcosahedronGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:77:73 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'LatheBufferGeometry'. Did you mean 'BufferGeometry'?

77 export declare type LatheBufferGeometryProps = BufferGeometryNode<THREE.LatheBufferGeometry, typeof THREE.LatheBufferGeometry>;
                                                                           ~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:77:107 - error TS2551: Property 'LatheBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

77 export declare type LatheBufferGeometryProps = BufferGeometryNode<THREE.LatheBufferGeometry, typeof THREE.LatheBufferGeometry>;
                                                                                                             ~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:78:78 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'OctahedronBufferGeometry'. Did you mean 'OctahedronGeometry'?

78 export declare type OctahedronBufferGeometryProps = BufferGeometryNode<THREE.OctahedronBufferGeometry, typeof THREE.OctahedronBufferGeometry>;
                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:78:117 - error TS2551: Property 'OctahedronBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'OctahedronGeometry'?

78 export declare type OctahedronBufferGeometryProps = BufferGeometryNode<THREE.OctahedronBufferGeometry, typeof THREE.OctahedronBufferGeometry>;
                                                                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/geometries/OctahedronGeometry.d.ts:8:14
    8 export class OctahedronGeometry extends PolyhedronGeometry {
                   ~~~~~~~~~~~~~~~~~~
    'OctahedronGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:79:73 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'PlaneBufferGeometry'. Did you mean 'BufferGeometry'?

79 export declare type PlaneBufferGeometryProps = BufferGeometryNode<THREE.PlaneBufferGeometry, typeof THREE.PlaneBufferGeometry>;
                                                                           ~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:79:107 - error TS2551: Property 'PlaneBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

79 export declare type PlaneBufferGeometryProps = BufferGeometryNode<THREE.PlaneBufferGeometry, typeof THREE.PlaneBufferGeometry>;
                                                                                                             ~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:80:78 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'PolyhedronBufferGeometry'. Did you mean 'PolyhedronGeometry'?

80 export declare type PolyhedronBufferGeometryProps = BufferGeometryNode<THREE.PolyhedronBufferGeometry, typeof THREE.PolyhedronBufferGeometry>;
                                                                                ~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:80:117 - error TS2551: Property 'PolyhedronBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'PolyhedronGeometry'?

80 export declare type PolyhedronBufferGeometryProps = BufferGeometryNode<THREE.PolyhedronBufferGeometry, typeof THREE.PolyhedronBufferGeometry>;
                                                                                                                       ~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/geometries/PolyhedronGeometry.d.ts:24:14
    24 export class PolyhedronGeometry extends BufferGeometry {
                    ~~~~~~~~~~~~~~~~~~
    'PolyhedronGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:81:72 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'RingBufferGeometry'. Did you mean 'BufferGeometry'?

81 export declare type RingBufferGeometryProps = BufferGeometryNode<THREE.RingBufferGeometry, typeof THREE.RingBufferGeometry>;
                                                                          ~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:81:105 - error TS2551: Property 'RingBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

81 export declare type RingBufferGeometryProps = BufferGeometryNode<THREE.RingBufferGeometry, typeof THREE.RingBufferGeometry>;
                                                                                                           ~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:82:73 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'ShapeBufferGeometry'. Did you mean 'BufferGeometry'?

82 export declare type ShapeBufferGeometryProps = BufferGeometryNode<THREE.ShapeBufferGeometry, typeof THREE.ShapeBufferGeometry>;
                                                                           ~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:82:107 - error TS2551: Property 'ShapeBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

82 export declare type ShapeBufferGeometryProps = BufferGeometryNode<THREE.ShapeBufferGeometry, typeof THREE.ShapeBufferGeometry>;
                                                                                                             ~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:83:74 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'SphereBufferGeometry'. Did you mean 'BufferGeometry'?

83 export declare type SphereBufferGeometryProps = BufferGeometryNode<THREE.SphereBufferGeometry, typeof THREE.SphereBufferGeometry>;
                                                                            ~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:83:109 - error TS2551: Property 'SphereBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

83 export declare type SphereBufferGeometryProps = BufferGeometryNode<THREE.SphereBufferGeometry, typeof THREE.SphereBufferGeometry>;
                                                                                                               ~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:84:79 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'TetrahedronBufferGeometry'. Did you mean 'TetrahedronGeometry'?

84 export declare type TetrahedronBufferGeometryProps = BufferGeometryNode<THREE.TetrahedronBufferGeometry, typeof THREE.TetrahedronBufferGeometry>;
                                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:84:119 - error TS2551: Property 'TetrahedronBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'TetrahedronGeometry'?

84 export declare type TetrahedronBufferGeometryProps = BufferGeometryNode<THREE.TetrahedronBufferGeometry, typeof THREE.TetrahedronBufferGeometry>;
                                                                                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/geometries/TetrahedronGeometry.d.ts:8:14
    8 export class TetrahedronGeometry extends PolyhedronGeometry {
                   ~~~~~~~~~~~~~~~~~~~
    'TetrahedronGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:85:73 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'TorusBufferGeometry'. Did you mean 'BufferGeometry'?

85 export declare type TorusBufferGeometryProps = BufferGeometryNode<THREE.TorusBufferGeometry, typeof THREE.TorusBufferGeometry>;
                                                                           ~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:85:107 - error TS2551: Property 'TorusBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

85 export declare type TorusBufferGeometryProps = BufferGeometryNode<THREE.TorusBufferGeometry, typeof THREE.TorusBufferGeometry>;
                                                                                                             ~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:86:77 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'TorusKnotBufferGeometry'. Did you mean 'TorusKnotGeometry'?

86 export declare type TorusKnotBufferGeometryProps = BufferGeometryNode<THREE.TorusKnotBufferGeometry, typeof THREE.TorusKnotBufferGeometry>;
                                                                               ~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:86:115 - error TS2551: Property 'TorusKnotBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'TorusKnotGeometry'?

86 export declare type TorusKnotBufferGeometryProps = BufferGeometryNode<THREE.TorusKnotBufferGeometry, typeof THREE.TorusKnotBufferGeometry>;
                                                                                                                     ~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/geometries/TorusKnotGeometry.d.ts:18:14
    18 export class TorusKnotGeometry extends BufferGeometry {
                    ~~~~~~~~~~~~~~~~~
    'TorusKnotGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:87:72 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'TubeBufferGeometry'. Did you mean 'BufferGeometry'?

87 export declare type TubeBufferGeometryProps = BufferGeometryNode<THREE.TubeBufferGeometry, typeof THREE.TubeBufferGeometry>;
                                                                          ~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:87:105 - error TS2551: Property 'TubeBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'BufferGeometry'?

87 export declare type TubeBufferGeometryProps = BufferGeometryNode<THREE.TubeBufferGeometry, typeof THREE.TubeBufferGeometry>;
                                                                                                           ~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/core/BufferGeometry.d.ts:76:14
    76 export class BufferGeometry<
                    ~~~~~~~~~~~~~~
    'BufferGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:108:69 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'CapsuleBufferGeometry'. Did you mean 'CapsuleGeometry'?

108 export declare type CapsuleGeometryProps = BufferGeometryNode<THREE.CapsuleBufferGeometry, typeof THREE.CapsuleBufferGeometry>;
                                                                        ~~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:108:105 - error TS2551: Property 'CapsuleBufferGeometry' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'CapsuleGeometry'?

108 export declare type CapsuleGeometryProps = BufferGeometryNode<THREE.CapsuleBufferGeometry, typeof THREE.CapsuleBufferGeometry>;
                                                                                                            ~~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/geometries/CapsuleGeometry.d.ts:18:14
    18 export class CapsuleGeometry extends BufferGeometry {
                    ~~~~~~~~~~~~~~~
    'CapsuleGeometry' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:142:62 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'AmbientLightProbe'. Did you mean 'AmbientLight'?

142 export declare type AmbientLightProbeProps = LightNode<THREE.AmbientLightProbe, typeof THREE.AmbientLightProbe>;
                                                                 ~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:142:94 - error TS2551: Property 'AmbientLightProbe' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'AmbientLight'?

142 export declare type AmbientLightProbeProps = LightNode<THREE.AmbientLightProbe, typeof THREE.AmbientLightProbe>;
                                                                                                 ~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/lights/AmbientLight.d.ts:15:14
    15 export class AmbientLight extends Light<undefined> {
                    ~~~~~~~~~~~~
    'AmbientLight' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:143:65 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'HemisphereLightProbe'. Did you mean 'HemisphereLight'?

143 export declare type HemisphereLightProbeProps = LightNode<THREE.HemisphereLightProbe, typeof THREE.HemisphereLightProbe>;
                                                                    ~~~~~~~~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:143:100 - error TS2551: Property 'HemisphereLightProbe' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'HemisphereLight'?

143 export declare type HemisphereLightProbeProps = LightNode<THREE.HemisphereLightProbe, typeof THREE.HemisphereLightProbe>;
                                                                                                       ~~~~~~~~~~~~~~~~~~~~

  node_modules/@types/three/src/lights/HemisphereLight.d.ts:21:14
    21 export class HemisphereLight extends Light<undefined> {
                    ~~~~~~~~~~~~~~~
    'HemisphereLight' is declared here.

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:161:53 - error TS2724: '"/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index"' has no exported member named 'DataTexture3D'. Did you mean 'DataTexture'?

161 export declare type DataTexture3DProps = Node<THREE.DataTexture3D, typeof THREE.DataTexture3D>;
                                                        ~~~~~~~~~~~~~

node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:161:81 - error TS2551: Property 'DataTexture3D' does not exist on type 'typeof import("/Users/lukewinship/Projects/202309-sillivilization/node_modules/@types/three/index")'. Did you mean 'DataTexture'?

161 export declare type DataTexture3DProps = Node<THREE.DataTexture3D, typeof THREE.DataTexture3D>;
                                                                                    ~~~~~~~~~~~~~

  node_modules/@types/three/src/textures/DataTexture.d.ts:40:14
    40 export class DataTexture extends Texture {
                    ~~~~~~~~~~~
    'DataTexture' is declared here.

For context, the relevant versions, from package.json:

    "@types/three": "^0.157.0",
    "typescript": "^5.2.2",
    "@react-three/fiber": "^8.14.5",

And, my tsconfig.json:

{
  "compilerOptions": {
    "target": "ES2018",
    "module": "ES2022",
    "lib": [
      "DOM",
      "ES2022"
    ],
    "sourceMap": true,
    "outDir": "./dist/",
    "downlevelIteration": true,
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "moduleResolution": "node",
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "jsx": "react-jsx"
  },
  "include": ["src/**/*.ts", "src/**/*.tsx"],
  "ts-node": {
    "esm": true,
    "compilerOptions": {
      "module": "nodenext"
    }
  }
}

Thanks

@itsbrex
Copy link

itsbrex commented Oct 17, 2023

@lukehesluke downgrading back to "three": "^0.135.0" fixed it for me.

@CodyJasonBennett
Copy link
Member

You can set skipLibCheck: true in tsconfig.json to bypass this at the moment.

Unfortunately v8 and earlier has to hardcode JSX definitions which is quite error prone since it's impossible to guarantee stability since three.js is in 0.x semver:

https://github.com/pmndrs/react-three-fiber/blob/master/packages/fiber/src/three-types.ts

This is something we changed in the next or v9 branch to be fully dynamic which we're having to thoroughly test against TypeScript inference limitations.

https://github.com/pmndrs/react-three-fiber/blob/v9/packages/fiber/src/three-types.ts

@CodyJasonBennett
Copy link
Member

Fixed in v8.15.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Typescript issues to do with TS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants