workflow-es icon indicating copy to clipboard operation
workflow-es copied to clipboard

Apparent Bug in 06-deferred-steps.ts

Open king612 opened this issue 5 years ago • 5 comments

I'm sorry I can't post the entire stack trace - I work on a closed system...

Running 06-deferred-steps.ts in VS Code:

   Error: the number of constructor arguments in in the derived class bodyClass must be >= than [sic] the number of constructor arguments of its base class.
   at /....../node_modules/inversify/lib/planning/planner.js:111:27
    :

king612 avatar Apr 11 '19 21:04 king612

02-hello-world.ts also fails with same error.

But all the rest of the samples worked for me.

(I'm only looking at TypeScript ones)

king612 avatar Apr 11 '19 21:04 king612

I can't reproduce this... what versions of Node.js and Typescript are you using? Also, if you're just running the samples... surely the stack trace should not contain anything sensitive?

danielgerlag avatar Apr 12 '19 02:04 danielgerlag

I'm running on Node 10.13, TS ^3.4.1.

It's not a sensitivity issue, it runs on an air-gapped system. I can't just cut and paste it - I'd literally have to retype the whole thing. (Makes working with open source projects a hassle, believe me, I know).

Let me try to provide more detail, but be aware this is rekeyed from the real stack trace so....

as posted before, the stack trace begins with: Error: the number of constructor arguments in in the derived class bodyClass must be >= than [sic] the number of constructor arguments of its base class. at /....../node_modules/inversify/lib/planning/planner.js:111:27

Followed by (abbreviated):

at Array.forEach at _createSubRequests ... inversify/lib/planning/planner.js:94:20 at Object.plan .... inversify/lib/planning/planner.js:136:9 at inversify/lib/container/container.js:317:37 ... more lines from Container at .... workflow-executor.js:92:65 at ....several more lines from executor (step, Object, step, Object..) at NewPromise () at __awaiter ... at workflow-queue-worker.js:117:60 ... more queue worker lines... WorkflowQueueWorker, step, Object.next, fulfilled)

It looks like at the node_modules level, the version of inversify that got installed looks to be 4.14.0

Hope this helps. --jfk

king612 avatar Apr 12 '19 15:04 king612

Any news on this issue? I am facing the same error within pure JS (without TS). The problem is related to thenRun method (inline step) - when it is removed, workflow has finished successfully.

Thanks, Jan

jan-kacina avatar Nov 22 '19 17:11 jan-kacina

Same issue when trying with Node 18 and typescript 4.8.4. Perhaps related to https://github.com/inversify/InversifyJS/issues/522

iakshay avatar Dec 19 '22 07:12 iakshay