question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript 4 support

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Reactions:173
  • Comments:30 (8 by maintainers)

github_iconTop GitHub Comments

38reactions
sheepsteakcommented, Aug 22, 2020

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-L35

30reactions
iansucommented, Oct 23, 2020

Fixed in Create React App 4.0.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found