This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
fork-ts-checker-webpack-plugin crashes with "Invalid source file:" #245
Open
Description
Originally wrongly reported here: #238 (comment)
Is this a bug report?
Yes. Edit: I originally thought this was a cra-ts bug, but it appeared that I had a bad tsconfig.json file.
Can you also reproduce the problem with npm 4.x?
Using yarn not npm.
Environment
npm ls react-scripts-ts
:react-scripts-ts@2.13.0
node -v
:v9.4.0
npm -v
:5.6.0
(don't use npm though)yarn --version
:1.3.2
Steps to Reproduce
- Can be reproduced with https://github.com/govau/cloud.gov.au/tree/cra-ts-fail/www/ui
- Directly in that folder you can run
yarn install
and thenyarn start
. - Open up a
src
file likeApp.tsx
. Press save in your editor and watch it crash.
Compiling...
/Users/me/my-app/www/ui/node_modules/fork-ts-checker-webpack-plugin/lib/service.js:22
throw error;
^
FatalError:
Invalid source file: /Users/me/my-app/www/ui/src/twirp.ts. Ensure that the files supplied to lint have a .ts, .tsx, .d.ts, .js or .jsx extension.
at new FatalError (/Users/me/my-app/www/ui/node_modules/tslint/lib/error.js:27:28)
at Linter.getSourceFile (/Users/me/my-app/www/ui/node_modules/tslint/lib/linter.js:222:23)
at Linter.lint (/Users/me/my-app/www/ui/node_modules/tslint/lib/linter.js:96:31)
at /Users/me/my-app/www/ui/node_modules/fork-ts-checker-webpack-plugin/lib/IncrementalChecker.js:142:30
at WorkSet.forEach (/Users/me/my-app/www/ui/node_modules/fork-ts-checker-webpack-plugin/lib/WorkSet.js:17:13)
at IncrementalChecker.getLints (/Users/me/my-app/www/ui/node_modules/fork-ts-checker-webpack-plugin/lib/IncrementalChecker.js:139:17)
at run (/Users/me/my-app/www/ui/node_modules/fork-ts-checker-webpack-plugin/lib/service.js:15:29)
at process.<anonymous> (/Users/me/my-app/www/ui/node_modules/fork-ts-checker-webpack-plugin/lib/service.js:38:5)
at process.emit (events.js:160:13)
at emit (internal/child_process.js:790:12)
After the first load, this happens every time I save a file and the app tries to reload.
I've tried react-scripts-ts@2.8.0
and that version does not have this issue.
Any ideas?
Metadata
Metadata
Assignees
Labels
No labels