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

[HELP] Issues with typing of luma.gl and deck.gl while trying to use the deck.gl layers in typescript #256

Open
RaviD24 opened this issue Sep 19, 2022 · 2 comments

Comments

@RaviD24
Copy link

RaviD24 commented Sep 19, 2022

Hi,
First ,thank you for this effort to provide typings to make deck.gl work in typescript., while trying to use the same in our code with arcgis as mentioned here: @deck.gl/arcgis

I am facing following errors, please help on how to resolve this

image

Also there are other errors on console which i am mentioning here as follows:
Error: node_modules/@luma.gl/gltools/src/index.d.ts:2:19 - error TS7016: Could not find a declaration file for module './utils/log'. Error: node_modules/@luma.gl/shadertools/src/modules/index.d.ts:46:29 - error TS7016: Could not find a declaration file for module './image-warp-filters/warp'. Error: node_modules/@luma.gl/webgl/src/classes/accessor.d.ts:2:12 - error TS2591: Cannot find name 'Buffer'. Do you need to install type definitions for node? Error: node_modules/@luma.gl/webgl/src/classes/clear.d.ts:8:17 - error TS7010: 'clearBuffer', which lacks return-type annotation, implicitly has an 'any' return type. Error: node_modules/@luma.gl/webgl/src/classes/copy-and-blit.d.ts:44:3 - error TS7006: Parameter 'source' implicitly has an 'any' type. Error: node_modules/@luma.gl/webgl/src/classes/copy-and-blit.d.ts:83:3 - error TS7006: Parameter 'source' implicitly has an 'any' type. Error: node_modules/@luma.gl/webgl/src/classes/copy-and-blit.d.ts:84:3 - error TS7006: Parameter 'target' implicitly has an 'any' type. Error: node_modules/@luma.gl/webgl/src/index.d.ts:15:35 - error TS7016: Could not find a declaration file for module './webgl-utils/constants-to-keys' Error: node_modules/@luma.gl/webgl/src/index.d.ts:16:66 - error TS7016: Could not find a declaration file for module './features/limits'. Error: node_modules/@luma.gl/webgl/src/index.d.ts:17:24 - error TS7016: Could not find a declaration file for module './features/webgl-features-table'. Error: node_modules/@luma.gl/webgl/src/index.d.ts:18:52 - error TS7016: Could not find a declaration file for module './features/features'. Error: node_modules/@luma.gl/webgl/src/index.d.ts:19:50 - error TS7016: Could not find a declaration file for module './features/check-glsl-extension'. Error: node_modules/@luma.gl/webgl/src/index.d.ts:56:50 - error TS7016: Could not find a declaration file for module './utils/load-file'. Error: node_modules/@luma.gl/webgl/src/index.d.ts:59:40 - error TS7016: Could not find a declaration file for module './glsl-utils/get-shader-name'. Error: node_modules/@luma.gl/webgl/src/index.d.ts:60:43 - error TS7016: Could not find a declaration file for module './glsl-utils/get-shader-version'. Error: node_modules/@luma.gl/webgl/src/webgl-utils/request-animation-frame.d.ts:2:64 - error TS2503: Cannot find namespace 'NodeJS'. 2 export function requestAnimationFrame(callback: any): number | NodeJS.Timeout; Error: node_modules/@types/deck.gl__core/index.d.ts:2255:23 - error TS2503: Cannot find namespace 'React'. 2255 ContextProvider?: React.Provider<T>; Error: node_modules/@types/deck.gl__layers/index.d.ts:156:25 - error TS2307: Cannot find module '@luma.gl/webgl/classes/texture-2d' or its corresponding type declarations. 156 import Texture2D from '@luma.gl/webgl/classes/texture-2d';

Adding import {DeckLayer} from '@deck.gl/arcgis'; works fine.
Import any other layer such as import {ScatterplotLayer} from '@deck.gl/layers'; causes these errors.

@danmarshall
Copy link
Owner

Can you share your repo?

@CAEG-DEV
Copy link

CAEG-DEV commented Nov 6, 2022

Same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants