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.

Fails to load enums from tsconfig path since 24.1.0

See original GitHub issue

Issue :

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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:11

github_iconTop GitHub Comments

1reaction
twittwercommented, Jan 16, 2020

@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 👍

1reaction
ahnpnlcommented, Oct 27, 2019

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.

Read more comments on GitHub >

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

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