inflearn logo
강의

Course

Instructor

All About TypeScript

encapsulation

ts-node extends시 에러가 발생합니다 ㅠㅠ

Resolved

836

kimanbin1764

5 asked

0

tsconfig.json에서

"extends": "@tsconfig/node16/tsconfig.json",

extends를 하고 다시 ts-node 명령어를 실행하면 아래와 같이 에러가 발생합니다.

tsconfig.json을 주석처리하고 ts-node를 하면 잘 수행됩니다..!

 

/usr/local/lib/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
error TS6053: File '@tsconfig/node16/tsconfig.json' not found.

    at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:863:19)
    at createFromPreloadedConfig (/usr/local/lib/node_modules/ts-node/src/index.ts:874:36)
    at phase4 (/usr/local/lib/node_modules/ts-node/src/bin.ts:543:44)
    at bootstrap (/usr/local/lib/node_modules/ts-node/src/bin.ts:95:10)
    at main (/usr/local/lib/node_modules/ts-node/src/bin.ts:55:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/ts-node/src/bin.ts:800:3)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32) {
  diagnosticCodes: [ 6053 ]
}

현재 노드 버전 : v17.0.1

노드를 완전 삭제 및 다시 설치해도 동일한 현상이 발생하고

노드 버전을 올리고 내려도 동일한 현상이 발생하네요..

혹시 해당 에러가 왜 발생할까요? ㅠㅠ

검색을 해도 잘 나오지가 않네요 ㅠㅠ

typescript Deno nestjs

Answer 1

0

kimanbin1764

자문 자답입니다!

 

노드가 처음이라 많이 헤맸네요 ㅠㅠ

"extends": "@tsconfig/node16/tsconfig.json",

해당 값에 ctrl 클릭하면 프로젝트 내의 node_modules로 잘 이동되어서 노드 버전을 의심했었네요 ㅠㅠㅠ

 

프로젝트 내에 node_modules가 존재하는데

글로벌 node_modules를 읽으려고 하여

프로젝트 내의 node_modules를 읽도록 tsconfig.json을 수정하였습니다..!

 

제네릭 클래스 핸드북 페이지가 undefined라고 나옵니다.

0

7

1

타입 주석

0

48

1

BuilderInit 사용 이유

0

409

1

데코레이터-2 강의 질문이 있습니다.

0

284

1

enum 질문이 있습니다.

0

330

1

색션 2, 데코레이터 개념이 아예 이해가 안됩니다.

0

539

1

변수의 타입에 클래스를 지정해준 것과 지정 안한 것 과의 차이가 어떻게 되는지 궁금해서 질문을 남깁니다.

0

369

2

섹션4 예제0 질문입니다.

0

719

2

제네릭 extends관련질문 있습니다.

0

367

1

안녕하세요 정말 좋은 강의 감사합니다

0

381

1

하나의 인터페이스와 여러 버전의 클래스에 관한 질문

0

413

1

!과 타입 단언 (보충) 질문

0

404

1

화살표 함수에서 this

0

435

1

constructor질문

0

262

1

타입 단언과 관련해서 질문드립니다.

0

651

1

extends와 implements질문 드립니다.

0

302

1

질문 드립니다.

0

375

2

as와 변수의 타입 지정 차이

0

353

1

undefined형식 에러

0

398

1

질문드립니다.

0

264

1

리터럴 타입 질문드립니다.

0

333

1

변수들이 var로 변합니다.

0

528

1

코딩 초보

0

462

1

service계층과 데이터베이스 요청 주고받을 때 Builder패턴 질문

0

1760

1