-
i'm in a lerna monorepo, but have no-hoisted the
curiously, this doesn't seem to be an issue when importing the ethers project within a nextjs api route, though afaik they should be using the exact same toolchain (babel with |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
did you ever find a solution to this? |
Beta Was this translation helpful? Give feedback.
-
@JChiaramonte7 nope ¯\_(ツ)_/¯ |
Beta Was this translation helpful? Give feedback.
-
This is something I had to work around too, since the elliptic package has circular references. If you check out the build scripts for signing-key it bundles up the elliptic package for ESM by doing some weird things. I forget exactly what, but if you check out the rollup configs it might help. I can look more into this next week to see if I can help though. Moving to discussions though, and if you figure it out in the meantime let me know too. I can add it to the docs. In v6 I’m hoping to move off of elliptic entirely, and onto more typescript friendly options. :) |
Beta Was this translation helpful? Give feedback.
-
So changing my jest config 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. |
Beta Was this translation helpful? Give feedback.
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.