slanatech / swagger-stats

API Observability. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices.
https://swaggerstats.io/
MIT License
886 stars 136 forks source link

Error in tests when updating to 0.99.7 #282

Open AfLosada opened 4 months ago

AfLosada commented 4 months ago

Hi guys, I recently updated my swagger version form 0.95.7 to 0.99.7 (latest) and my jest unit tests are failing. Here is the log:

 RUNS  src/data-query/stats/baseball/MLB/players/players-baseball-stats.test.js
node:internal/modules/esm/utils:180
    throw new ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG();
          ^

TypeError: A dynamic import callback was invoked without --experimental-vm-modules
    at importModuleDynamicallyCallback (node:internal/modules/esm/utils:180:11)
    at /Users/andres.f.losada/Documents/Repositories/xxx/products/<my-product>/node_modules/swagger-stats/lib/swsElasticEmitter.js:15:5

Is this expected? Am I missing some babel config (i've already tried adding @babel/plugin-syntax-dynamic-import to my .babelrc)