tsdx
tsdx copied to clipboard
Parsing error: Cannot read property 'map' of undefined
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
Getting the same behaviour...
Any ideas on this @jaredpalmer ?
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.
I am encountering this issue, too. It's a bit of a pain given that lint runs in the github actions. It's a parsing error, so my instinct was to switch the parser to @typescript-eslint/parser but that hasn't done the trick.
This is the corresponding SO question.
The workaround is to not use tuple types, or move over to a package that is not stale like dts-cli.