nestia icon indicating copy to clipboard operation
nestia copied to clipboard

nestia sdk fails with tsconfig's Lib

Open sacru2red opened this issue 1 year ago • 5 comments

Bug Report

I found case that no matter what value I put in the Lib value in tsconfig.json, the sdk build fails. (If the Lib value is left blank, the build succeeds.)

Do you know why or how to fix it?

https://github.com/sacru2red/nestia-error-with-tsconfig-lib

sacru2red avatar Aug 22 '24 04:08 sacru2red

I dont know why it fails on lib is empty array ("lib": [])

image

sacru2red avatar Aug 22 '24 04:08 sacru2red

I temporarily deleted the "lib". And added the "types" property.

"types": [
      "jest",
      "node",
      "multer",
      "typescript/lib/lib.es2023.d.ts"
    ],

-> fails

sacru2red avatar Aug 22 '24 04:08 sacru2red

It is because if you clear the lib property, you can get the File instance type.

Just fill like below, then no problem.

{
  "lib": ["DOM", "ES2015"]
}

samchon avatar Aug 22 '24 05:08 samchon

By the way, LTS @types/node version has started declaring the File class type by itself.

I should make it work without the DOM lib configuration in typia.

samchon avatar Aug 22 '24 05:08 samchon

저는 제대로 이해를 못한 것 같아요.

  1. "lib": ["DOM", "ES2015"]가 필요하다면 setup 문서에서 설명이 있어야 할 것 같고,
  2. 말씀하신대로 구성없이 성공하도록 수정을 하는 것도 방법일 것 같습니다.

1번의 방법은 조금 이상하다고 생각하는게 지금 제가 보고있는데 tsconfig.json인데 이건 nestjs 프로젝트에 대한 설정이잖아요? DOM API를 안쓰는데, DOM을 쓰면 뭔가 이상하지 않나요..

sacru2red avatar Aug 22 '24 05:08 sacru2red