INTERNAL ERROR: Cannot read property 'fileNames' of undefined when use fork-ts-checker-webpack-plugin instead of build-in TypeScript type checker
No this error
npm i && npm run developmentBuild. Once dependencies will be installed, webpack build will start.INTERNAL ERROR: Cannot read property 'fileNames' of undefined in your console.
Make sure that this error will not occur without your plugin. Comment out line 48 (transpileOnly: true), and also rows 73-76 in webpack.config.js.
Re-run npm run developmentBuild. This time console will be clean:

const a;) and save the file, you will see the errors casted by build-in TypeScript type checker:
Thanks for the repo. It's quite large and so that doesn't make diagnosis easy. Would you be able to confirm if your issue presents with [email protected] ? I'm curious as to whether there's a regression or if this might be user error
Thank you for the quick response.
Unfortunately, nothing changed with [email protected].
It's quite large and so that doesn't make diagnosis easy.
This bug occurred also in my other smaller project. You can use this project for investigations instead. This time npm command is long, so please use copy-paste to execute it:
npm run SourceCodeCompilingAndBunding:DevelopmentBuild
Okay, this took me too long to debug. No it's not a bug.
In your webpack config, you have to set the whole path to the tsconfig, including the filename, not just the folder:
new ForkTsCheckerWebpackPlugin({
tsconfig: Path.resolve(__dirname)
})
this is wrong.
@phryneas,
You right, my mistake. Thank you for the investigation.
Well, this is not a bug, but could I call it "non-accurate error message"?
Could you please to determine the error like this in the future and output the error "Incorrect file path to 'tsconfig.json'"?
Most helpful comment
Okay, this took me too long to debug. No it's not a bug.
In your webpack config, you have to set the whole path to the tsconfig, including the filename, not just the folder:
this is wrong.