Fails to load enums from tsconfig path since 24.1.0
See original GitHub issueIssue :
Since version 24.1.0 the loading of enums via tsconfig path mapping fails.
If I import a enum from a relative location ../foo.enum
the test succeeds, but when using a tsconfig path @myorg/foo
it throws with the following error:
TypeError: Cannot read property 'EnumValue' of undefined
It works until version 24.0.2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:11
Top Results From Across the Web
Path aliases in tsconfig.json don't work for all paths
I have setup path aliases in my tsconfig.json which looks like sop ... However, for some reason everything works except for @enums and ......
Read more >@shopify/eslint-plugin | Yarn - Package Manager
You'll first need to install ESLint: With Yarn yarn add --dev eslint. With npm $ npm i eslint --save-dev. Next, install @shopify/eslint-plugin :...
Read more >coc-snippets/package.json - UNPKG
35, "description": "Enable load snippets from extensions." ... 69, "description": "Enable trigger auto trigger snippet after type character.".
Read more >Unexpected end of JSON input while parsing near '...F8i6A ...
1 Install Node Version Manager (or NVM for Windows) and install Node version 10.16.1 ... locate the package.json file that is throwing an...
Read more >Active questions tagged react-native+typescript - Stack Overflow
Next React Native Typescript babel-plugin-module-resolver error: Cannot find ... In the file "PinCode" I have an enum and an interface. ... tsconfig.json
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
@ahnpnl I tried to build a simplified repo with the current version of all dependencies and it turns out, the problem seems to be fixed maybe with 24.3.0 or the usage from other the libraries changed since october.
Any way thx for the help, it seems to be fixed now 👍
yes, either you can use that internal function provided by
ts-jest
, or you can use normal regex.@twittwer the issue isn’t caused by
ts-jest
version. I hope the solution provided by @AhmedMKamal answered your question.