TypeScript 4 support
See original GitHub issueDescribe the bug
After updating to typescript@4.0.2
with react-scripts@3.4.1
(I also tried version 3.4.3
where I couldn’t find any release notes) the following eslint
error occurred:
Parsing error: Cannot read property 'map' of undefined
This happened only after deleting all of my node_modules
and recreating the package-lock.json
from scratch.
It seems to be related to @typescript-eslint/eslint-plugin
. And I don’t know why but the referenced versions in react-scripts
seems to be very old. From react-scripts@3.4.1
package.json
:
"@typescript-eslint/eslint-plugin": "^2.10.0",
"@typescript-eslint/parser": "^2.10.0",
Current versions of @typescript-eslint/eslint-plugin
and @typescript-eslint/parser
are as of now 3.9.1
.
- Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
- npm: 6.14.6 - ~/.nvm/versions/node/v12.18.3/bin/npm
Issue Analytics
- State:
- Created 3 years ago
- Reactions:173
- Comments:30 (8 by maintainers)
Top Results From Across the Web
Documentation - TypeScript 4.0
That's why TypeScript 4.0 supports a new ECMAScript feature to add three new assignment operators: &&= , ||= , and ??= . These...
Read more >Announcing TypeScript 4.0 - Microsoft Developer Blogs
In the 3.4 release, we leaned farther into supporting functional patterns, with better support for immutable data structures, and improved ...
Read more >Releases · microsoft/TypeScript - GitHub
fixed issues query for Typescript v4.9.4. Downloads are available on: npm · NuGet package. Changes: e286821 Bump version to 4.9.4 and ...
Read more >TypeScript configuration - Angular
TypeScript is a primary language for Angular application development. It is a superset of JavaScript with design-time support for type safety and tooling....
Read more >ReSharper by Language: TypeScript - JetBrains
ReSharper 2022.3 fully supports TypeScript from v. 1.4 to v. 3.0. ... ReSharper will use the highest version for the whole solution.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This should get fixed in the next release as
react-scripts
in master now requires newer versions: https://github.com/facebook/create-react-app/blob/776373741ad254d66c52991f0639422b195c1d59/packages/react-scripts/package.json#L34-L35Fixed in Create React App 4.0.