iot-app-kit
iot-app-kit copied to clipboard
error TS2315: Type 'Object3D' is not generic
Unable to compile in Angular app, following errors occur on issuing 'ng serve';
Error: node_modules/@iot-app-kit/scene-composer/dist/src/store/Store.d.ts:52:61 - error TS2315: Type 'Object3D' is not generic.
52 getObject3DBySceneNodeRef: (ref: string | undefined) => import("three").Object3D<import("three").Event> | undefined; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@iot-app-kit/scene-composer/dist/src/store/Store.d.ts:59:58 - error TS2315: Type 'Object3D' is not generic.
59 setSceneNodeObject3DMapping: (ref: string, object3d: import("three").Object3D<import("three").Event>) => void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@iot-app-kit/scene-composer/dist/src/store/Store.d.ts:115:61 - error TS2315: Type 'Object3D' is not generic.
115 getObject3DBySceneNodeRef: (ref: string | undefined) => import("three").Object3D<import("three").Event> | undefined; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@iot-app-kit/scene-composer/dist/src/store/Store.d.ts:122:58 - error TS2315: Type 'Object3D' is not generic.
122 setSceneNodeObject3DMapping: (ref: string, object3d: import("three").Object3D<import("three").Event>) => void; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@iot-app-kit/scene-composer/dist/src/three/TransformControls.d.ts:132:46 - error TS2315: Type 'Mesh' is not generic.
132 declare class TransformControlsPlane extends Mesh<PlaneGeometry, MeshBasicMaterial> { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@iot-app-kit/scene-composer/node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:19:69 - error TS2694: Namespace '"G:/git/Public/aws-samples/aws-iot-robot/PiBot-website/node_modules/three/src/Three"' has no exported member 'ColorRepresentation'.
19 export declare type ColorArray = typeof THREE.Color | [color: THREE.ColorRepresentation]; ~~~~~~~~~~~~~~~~~~~
Error: node_modules/@iot-app-kit/scene-composer/node_modules/@react-three/fiber/dist/declarations/src/three-types.d.ts:108:69 - error TS2724: '"G:/git/Public/aws-samples/aws-iot-robot/PiBot-website/node_modules/three/src/Three"' has no exported member named 'CapsuleBufferGeometry'. Did you mean 'ShapeBufferGeometry'?
108 export declare type CapsuleGeometryProps = BufferGeometryNode<THREE.CapsuleBufferGeometry, typeof THREE.CapsuleBufferGeometry>; ~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/@iot-app-kit/scene-composer/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("G:/git/Public/aws-samples/aws-iot-robot/PiBot-website/node_modules/three/src/Three")'. Did you mean 'ShapeBufferGeometry'?
108 export declare type CapsuleGeometryProps = BufferGeometryNode<THREE.CapsuleBufferGeometry, typeof THREE.CapsuleBufferGeometry>;
To Reproduce Simply add the following import to the ts file for any angular component;
import { SceneViewer } from '@iot-app-kit/scene-composer';
I can add the other iot-app-kit imports without error, it is just anything related to the scene composer
Expected behavior Code should compile successfully
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): Windows 11
Smartphone (please complete the following information): N/A
Additional context Add any other context about the problem here.
Created task in TwinMaker backlog
I am facing same issue. Is there any update regarding this bug?
@gemmerton How did you solve it ?
We will review the priority of this bug soon.
Angular is not the official supported framework. Closing this issue. Feel free to file a feature request if Angular is necessary for your use case. 🙏