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

error TS2315: Type 'Object3D' is not generic #1731

Open
gemmerton opened this issue Jul 25, 2023 · 4 comments
Open

error TS2315: Type 'Object3D' is not generic #1731

gemmerton opened this issue Jul 25, 2023 · 4 comments
Labels
bug Something isn't working Triaged When the ticket has been correctly triaged, add this label TwinMaker Team Issues associated with the TwinMaker team

Comments

@gemmerton
Copy link

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.

@gemmerton gemmerton added the bug Something isn't working label Jul 25, 2023
@corteggiano corteggiano added TwinMaker Team Issues associated with the TwinMaker team Triaged When the ticket has been correctly triaged, add this label labels Jul 31, 2023
@haweston
Copy link
Contributor

haweston commented Feb 1, 2024

Created task in TwinMaker backlog

@miantalha48
Copy link

I am facing same issue. Is there any update regarding this bug?

@miantalha48
Copy link

@gemmerton How did you solve it ?

@sheilaXu
Copy link
Contributor

We will review the priority of this bug soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Triaged When the ticket has been correctly triaged, add this label TwinMaker Team Issues associated with the TwinMaker team
Projects
None yet
Development

No branches or pull requests

5 participants