Is it possible to use CommonJs with AdonisJs version 6 #4390
-
I am trying to implement open telemetry (https://signoz.io/blog/nodejs-opensource-application-monitoring/) in Adonis Js version 6. This requires implementing a Does this mean all packages that use only CommonJs are not supported in AdonisJs V6 or there is a way around this? Please help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey @kaypee90! 👋🏻 The error states you are trying to load an ESM module in a CJS environment. So I am not sure what you have done. Could you share some code? |
Beta Was this translation helpful? Give feedback.
-
Hey @RomainLanz, I'm having a issue setting up this... If I use node --require tracing.cjs ace serve --watch, after adonis starting ... It stops sending events from app. If I use as a preload on Maybe Note: After build for production it actually works |
Beta Was this translation helpful? Give feedback.
Your file is coded in CJS; you have to name it
tracing.cjs
for it to be loaded as CJS.