Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using different task implementations is not working #141

Open
JeremiePat opened this issue Jul 16, 2023 · 1 comment
Open

Using different task implementations is not working #141

JeremiePat opened this issue Jul 16, 2023 · 1 comment

Comments

@JeremiePat
Copy link

πŸ‘“ 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 :

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

@JeremiePat
Copy link
Author

It looks like PR #133 could help fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant