티스토리 뷰

반응형

error TS5055: Cannot write file 'interface.d.ts' because it would overwrite input file.

 

njestjs 혹은 ts 환경에서 개발하다보면 자주 발생하는 오류다.

[23:19:22] File change detected. Starting incremental compilation...

error TS5055: Cannot write file 'D:/Projects/2022/nest-js-api/dist/item/dtos/item.dto.interface.d.ts' because it would overwrite input file.

[23:19:22] Found 1 error. Watching for file changes.

 

이런경우에 대부분 파일을 import할때  변환된 파일인 [dist] 폴더에있는 '.d' 파일이 import 된 경우이다.

import를 바로잡아주면 잘 진행 되는걸 알 수 있다.

[예(ex)]

import { IUpdateItemDto } from './../../dist/item/dtos/item.dto.interface.d';

.d 파일을 추가하여 오류가 발생하였다.

정상적인 경로로 바로 잡아주면된다.

 

#ts #nest #nestjs #javascript #api #webapi #server #webserver

반응형
댓글
반응형