Skip to content

Bundling error for Typescript config and processor #3742

Description

@tilln

If both the script config and the processor are Typescript, the "esbuild" bundling fails with

Error: Build failed with 1 error:
error: Must use "outdir" when there are multiple input files

Version info:

Artillery: 2.0.32
Node.js:   v24.15.0
OS:        linux

Running this command:

artillery run-fargate [...] config.ts

I expected to see this happen:

The scripts to be bundled and run in Fargate without error.
Local runs work fine.

Instead, this happened:

Bundling fails with the above error.
The dist folder contains 2 transpiled files: processor.js and config.ts.js.

If only one script is Typescript, there is no issue (e.g. Yaml config or JS processor).

Files being used:
config.ts

export const config = {
    target: 'https://',
    processor: 'processor.ts',
};

export const scenarios = [
    {
        flow: [
            {
                function: 'dummy'
            }
        ]
    }
];

processor.ts

export async function dummy(context, events) {
    console.log('processor function');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions