npm start only reports a single error on save #103
Description
Can you reproduce the problem with latest npm?
Yes.
Can you still reproduce it?
Yes.
Description
What are you reporting?
Start with a fresh app resulting from invoking create-react-app. Run npm start
. See it startup normally. Now introduce a few errors. I deleted the close angle bracket on the second div in src/App.tsx but it could be anything. Save.
I only get a single error message.
Failed to compile.
./src/App.tsx
(11,11): error TS1003: Identifier expected.
Run tsc. Get 3 error messages.
test-app$ tsc
src/App.tsx(11,11): error TS1003: Identifier expected.
src/App.tsx(17,7): error TS2657: JSX expressions must have one parent element.
src/App.tsx(18,5): error TS1109: Expression expected.
Introduce another error, perhaps in a different file. Save. Note that you still only get a single error message. Run tsc and note that they all get reported.
I can't see any pattern to the error reporting. I'll sometimes have several errors in different files. They are reported one at a time and jump from file to file and back again without any apparent order.
Expected behavior
Tell us what you think should happen.
On save it should report all compile errors.
Actual behavior
Tell us what actually happens.
It only reports a single error regardless of how many there are.
Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts-ts
(if you haven’t ejected):
test-app$ npm ls react-scripts-ts
test-app@0.1.0 /home/gb/tmp/test-app
└── react-scripts-ts@2.3.2
node -v
:
test-app$ node -v
v6.2.2
npm -v
:
test-app$ npm -v
5.1.0
Then, specify:
-
Operating system: Ubuntu 16.04
-
Browser and version: Chrome Version 59.0.3071.115 (Official Build) (64-bit)
Reproducible Demo
Push to GitHub and paste the link here.
https://github.com/gbishop/crats-error
By doing this, you're helping the Create React App contributors a big time!
Demonstrable issues gets fixed faster.