node-ts / bus

A typescript based enterprise service bus framework based on enterprise integration patterns
https://bus.node-ts.com/
MIT License
270 stars 26 forks source link

Problem with lodash and persisting workflow state #205

Closed dlebee closed 9 months ago

dlebee commented 1 year ago

I get this error from the persistence module.

    at MongodbPersistence.saveWorkflowState (C:\_dev\experiment\substrate-relayer-tsoa\node_modules\@node-ts\bus-mongodb\dist\mongodb-persistence.js:76:60)
    at C:\_dev\experiment\substrate-relayer-tsoa\node_modules\@node-ts\bus-core\dist\workflow\registry\workflow-registry.js:152:44
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) undefined rejected {
  status: 'rejected',
  reason: TypeError: (0 , lodash_mapkeys_1.default) is not a function
      at MongodbPersistence.saveWorkflowState (C:\_dev\experiment\substrate-relayer-tsoa\node_modules\@node-ts\bus-mongodb\dist\mongodb-persistence.js:76:60)
      at C:\_dev\experiment\substrate-relayer-tsoa\node_modules\@node-ts\bus-core\dist\workflow\registry\workflow-registry.js:152:44
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
}

I took a look at the compiled mongo-persistence lodash_mapkeys_1.default is undefined but if I remove .default its defined and the code works.

is it a configuration on my side or is it the compiled code that has an issue?

thank you, David L