How to Integrate Geckos.io with Nest.js Using CommonJS? #290
Unanswered
J-Jaeh
asked this question in
Help / Questions
Replies: 1 comment
-
"I've solved it, brother. I changed the build method of NestJS to ESM. Thank you~" |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm a student working on a multiplayer web game project with my friends. We started with Socket.IO but wanted to explore UDP communication for smoother gameplay. During my research, I came across Geckos.io and found it intriguing.
Currently, our backend server is built with Nest.js. When trying to integrate Geckos.io by installing @geckos.io/server, I encountered an issue related to module loading. Geckos.io supports ES Modules (ESM), while our Nest.js project uses CommonJS (require) during the build process, which is causing compatibility issues. Specifically, Node.js environments don't allow mixing ES Modules and CommonJS seamlessly.
I'm seeking advice on how to resolve this error. Is there a recommended approach for integrating Geckos.io with Nest.js projects, considering the ES Module and CommonJS compatibility?
Thank you in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions