【tsconfig.jsonのエラー】Cannot write file ‘path’ because it would overwrite input file.

 

tsconfig.jsonで出るエラー

Cannot write file ‘c:/パス/dist/index.js’ because it would overwrite input file.

について。

“compilerOptions”に、以下を追加したら消えた。

"compilerOptions":{
  "outDir": "dist",  //出力フォルダを指定
}

tsconfig.json配下に出力フォルダを作る場合、ちゃんと出力フォルダを明示してやらないといけないらしい。

 

コメント

タイトルとURLをコピーしました