When running a test with syntax errors, the dependency analysis fails, but the error message received by the user may be confusing because it refers to the automatic dependency resolution.
cat <<EOF | k6 run -
export default function() {
console.log('hello world'
}
> EOF
ERRO[0000] Automatic extension resolution is enabled but it failed to analyze the dependencies. Please, make sure to report this issue by opening a bug report. error="-:3:2 Expected \")\" but found \"}\""
ERRO[0000] -:3:2 Expected ")" but found "}"
With the automatic extension resolution disabled, the error message is:
ERRO[0000] GoError: file:///-: Line 3:3 Unexpected token } (and 1 more errors) hint="script exception
It would be preferable the error message were more specific to the root cause.