Parsing error: Cannot read property 'map' of undefined
See original GitHub issueCurrent 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:
- Created 2 years ago
- Reactions:10
- Comments:5
Top 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 >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 Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same for me : this kind of workaround didn’t work ( https://github.com/formium/tsdx/issues/926#issuecomment-751936109 ) either
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.