-
-
Notifications
You must be signed in to change notification settings - Fork 9
Description
π What did you see?
I'm trying to use the "Using different task implementations" feature, unfortunately, while using it I got the following error message in my console : Error: No task in: myfile/path.{ts,js,tsx,jsx}
β What did you expect to see?
It should work as expected
π¦ Which tool/library version are you using?
Note that I'm using Node.JS 20.3.1
I'm NOT using TypeScript so there is not transpilation happening in my stack.
π¬ How could we reproduce it?
Just follow the @cucumber/screenplay documentation, it is simply not working
π Any additional context?
I did some investigation on that bug and the error is thrown here :
screenplay.js/src/asyncAssignTasks.ts
Line 23 in fbdb6bb
const task = await Function(`return import("${path}")`)() |
The issue is due to the lack of extension in the dynamique import statement (I tried to manually add an extension, it works just fine). As per the Node.JS documentation : "A file extension must be provided when using the import keyword", see : https://nodejs.org/api/esm.html#mandatory-file-extensions