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.

Parsing error: Cannot read property 'map' of undefined

See original GitHub issue

Current Behavior

export type Tuple = [number, number];

after running yarn lint getting error 0:0 error Parsing error: Cannot read property 'map' of undefined. Build and test commands work fine.

Additional context

Tried the same in Create React App, seems to be working fine.

Your environment

  System:
    OS: macOS 10.15.7
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 870.95 MB / 16.00 GB
    Shell: 3.1.2 - /opt/local/bin/fish
  Binaries:
    Node: 14.15.3 - ~/.nvm/versions/node/v14.15.3/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.3/bin/yarn
    npm: 7.7.2 - ~/.nvm/versions/node/v14.15.3/bin/npm
    Watchman: 4.9.0 - /opt/local/bin/watchman
  Browsers:
    Chrome: 90.0.4430.212
    Firefox: 87.0
    Firefox Developer Edition: 89.0
    Safari: 14.1
  npmPackages:
    tsdx: 0.14.1 => 0.14.1 
    typescript: 4.2.4 => 4.2.4

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:10
  • Comments:5

github_iconTop GitHub Comments

2reactions
jy95commented, Aug 10, 2021

Same for me : this kind of workaround didn’t work ( https://github.com/formium/tsdx/issues/926#issuecomment-751936109 ) either

1reaction
buzuoshengcommented, Sep 17, 2021

I dont wirte ‘map’ in my file, so i cant understand why i have such a problem. And i dont find any way to fix it. i just replace it with ‘eslint’ finally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Line 0: Parsing error: Cannot read property 'map' of undefined
This error occurs because react-scripts has a direct dependency on the 2.xx range of @typescript-eslint/parser and ...
Read more >
How to Prevent the TypeError: Cannot Read Property Map of ...
As a result, the TypeError Cannot read property 'map' of undefined is very common and one of the first errors that developers will...
Read more >
Parsing error: Cannot read property 'map' of undefined on ...
Parsing error : Cannot read property 'map' of undefined on import when a function has an array return type #2446. Closed. 3 tasks...
Read more >
Line 0: Parsing error: : Cannot read property 'map' of undefined
Reinstall the dependencies: rm -rf node_modules; yarn install · Remove the cache that's inside the build directory: remove the build directory ...
Read more >
cannot read properties of undefined (reading 'map') typescript
The TypeError: Cannot read properties of undefined (reading 'map') occurs when we call the `map()` method on an `undefined` value, most often when...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found