본문 바로가기

[Dev] 🎯Self Study/[코딩] 너 또 오류나 ? error 모음집

[너 또 오류나? tsconfing.json 오류] json schema for the typescript compiler's configuration file error

응 어김없이 오류발견~

 

 

이번엔 tsconfig.json을 만들다 맞닥뜨렸다.

{
  "compilerOptions": {
    "allowJs": true,
    "checkJs": true,
    "noImplicitAny": true
  }
}

 

 

이것저것 해봤지만, 오히려 더 많은 오류를 보게되었고.. 

 

Option 'checkJs' cannot be specified without specifying option 'allowJs'

{
  "compilerOptions": {
    "allowJs": false,
    "checkJs": true,
    "noImplicitAny": true
  }
}

 

좀 더 찾다가 간단한 해결 방법을 찾았다.

 

거두절미하고 코드 드리겠음

{
  "compilerOptions": {
    "outDir": "build",
  }
}
이 outDir만 추가해주시면 된다! 

 

 

Cannot write file because it would overwrite input file TS | bobbyhadz

The error "Cannot write file because it would overwrite input file" occurs when we haven't specified the outDir directory in the exclude array.

bobbyhadz.com

더 자세한 해결방법과 만약 이 방법으로도 안된다면, 이 링크를 참조해서 따라가면 된다!