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

fix Error [ERR_UNSUPPORTED_ESM_URL_SCHEME] when using a artillery runner file with a .mjs extension #2662

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thrandale
Copy link

This fixes issue #2661

@CLAassistant
Copy link

CLAassistant commented Apr 22, 2024

CLA assistant check
All committers have signed the CLA.

@hassy
Copy link
Member

hassy commented Apr 22, 2024

thanks @thrandale! Is the issue due to a missing relative path? ie. in your example ./artilleryRunner.mjs should work as expected (if the MJS file is in the same directory as the YAML script). There's a test for loading ESM here, would you mind updating that please? https://github.com/artilleryio/artillery/blob/242a7964934851bf77e53eebf44e6312de723663/packages/artillery/test/cli/async-hooks-esm.test.js

@thrandale
Copy link
Author

thrandale commented Apr 22, 2024

@hassy Even using a relative path, it still fails with the same error. When it does the path.resolve(), that resolve either an absolute or relative path to an absolute path. It is odd that it is not failing in the CI. I believe this is only an issue on Windows. Does the CI run the windows tests?

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

Successfully merging this pull request may close these issues.

None yet

3 participants