• 카테고리

    질문 & 답변
  • 세부 분야

    프로그래밍 언어

  • 해결 여부

    미해결

혹시 이런오류는 왜 날까요?

21.01.01 22:15 작성 조회수 672

0

../../node_modules/@types/webgl2/index.d.ts:582:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'WebGL2RenderingContext' must be of type '{ new (): WebGL2RenderingContext; prototype: WebGL2RenderingContext; readonly ACTIVE_ATTRIBUTES: number; readonly ACTIVE_TEXTURE: number; ... 556 more ...; readonly WAIT_FAILED: number; }', but here has type '{ new (): WebGL2RenderingContext; prototype: WebGL2RenderingContext; readonly ACTIVE_ATTRIBUTES: number; readonly ACTIVE_TEXTURE: number; 

... 557 more ...; readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: number; }'.

582 declare var WebGL2RenderingContext: {

                ~~~~~~~~~~~~~~~~~~~~~~

  ../../AppData/Roaming/npm/node_modules/typescript/lib/lib.dom.d.ts:16394:13

    16394 declare var WebGL2RenderingContext: {

                      ~~~~~~~~~~~~~~~~~~~~~~

    'WebGL2RenderingContext' was also declared here.

이러한 오류가 나네요.. 구글링해도 명확한 답이 안나와요ㅠ

답변 9

·

답변을 작성해보세요.

0

ballde님의 프로필

ballde

질문자

2021.01.02

알겠습니다! 감사합니다!

0

nest쪽은 저도 잘 모르겠습니다. 사실 @types/webgl2 에러 자체를 처음 봅니다. 제 소스 코드 상에서는 발생하지 않는 에러라서요.

0

ballde님의 프로필

ballde

질문자

2021.01.02

nest 해보려고 typescript 보는중인데 위와 같은 애러때문에 nest 가 실행이 안되네요. nest에다가 npm install @types/webgl2를 해도 안되서요

0

설치해서 해결하신 것 아닌가요?

0

ballde님의 프로필

ballde

질문자

2021.01.02

감사합니다!  혹시 해결은 어떻게 해야 할까요ㅠ

0

원래 설치할 필요가 없는데 타입스크립트 어딘가에서 충돌이 난 것 같습니다.

0

ballde님의 프로필

ballde

질문자

2021.01.02

npm install @types/webgl2 까니까 오류가 안나네요.. 음 혹시 이거 왜 깔아야하는지 아시나요

0

ballde님의 프로필

ballde

질문자

2021.01.02

`-- (empty) 라고 뜨네용

0

터미널에 npm ls @types/webgl2 쳐서 어떤 라이브러리가 이 타이핑을 쓰고 있는지 확인해보세요.