Skip to content

importing ethers in a babel-jest or ts-jest file throws due to elliptic import #1574

Answered by jcmonte
shrugs asked this question in Q&A
Discussion options

You must be logged in to vote

So changing my jest config moduleDirectories from ['node_modules', '.'] to ['node_modules', '<rootDir>'] fixed it for me.

Not 100% sure I understand here, but I think this fix directs jest to look for dependencies from the root instead of the current directory. Which sounds like it might fix the circular dependency issue with 'ec'? At least it did in my case.

Anyways, I'm just going to leave this here in case it helps others in the future.

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@sentilesdal
Comment options

@probablyangg
Comment options

Answer selected by ricmoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #1269 on May 18, 2021 23:45.