oscklm
oscklm4mo ago

Require cycle issues, can't seem to troubleshoot to where its coming from

Hello, I'm getting this error when starting my expo web server. And have tried troubleshooting it for a while now, but can't seem to find any place where this import cycle happens that has anything to do with the files mentioned in the error: Can anyone from the convex team, help me shine some light on this and where i could maybe look and check?
λ WARN Require cycle: node_modules/convex/dist/cjs/server/impl/actions_impl.js -> node_modules/convex/dist/cjs/server/api.js -> node_modules/convex/dist/cjs/server/impl/actions_impl.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
factory (node_modules/convex/dist/cjs/server/api.js:35:27)
factory (node_modules/convex/dist/cjs/server/impl/actions_impl.js:29:18)
λ WARN Require cycle: node_modules/convex/dist/cjs/server/impl/actions_impl.js -> node_modules/convex/dist/cjs/server/api.js -> node_modules/convex/dist/cjs/server/impl/actions_impl.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
factory (node_modules/convex/dist/cjs/server/api.js:35:27)
factory (node_modules/convex/dist/cjs/server/impl/actions_impl.js:29:18)
2 Replies
ballingt
ballingt4mo ago
Hi @oscklm, this looks like a warning about the Convex library. It should be fine, but we can change the Convex library code to prevent the warning. You'll have to deal with this warning until the next client release.
oscklm
oscklmOP4mo ago
That explains it. I had some similiar require cycle warnings in some of my own code, not so long ago. So actually thought for a second it was something i had caused. But i can tell, since it is in fact coming from the node_modules/ that indicates its inside the library. Thanks for clearing that up! I will just ignore this until that!

Did you find this page helpful?