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

Could not resolve node_module dependency when running on Fargate #3409

Open
zatlodan opened this issue Nov 15, 2024 · 1 comment
Open

Could not resolve node_module dependency when running on Fargate #3409

zatlodan opened this issue Nov 15, 2024 · 1 comment

Comments

@zatlodan
Copy link

zatlodan commented Nov 15, 2024

Running artillery run-fargate command via docker.
I encounter the following error when adding a custom flow function which uses any node_module dependency:

ERROR: Could not resolve "<dependency-name>"

Full Task log: log-events-viewer-result.csv

Version info:

artilleryio/artillery:latest

Minimal example repository:

All other details are seen in the minimal example repository I have prepared.

https://github.com/zatlodan/artillery-issue-minimal

nvm use

yarn

cp .env.example .env

# Add your AWS credentials
nvim .env

yarn run:cloud

# Inspect the task output to see the error
google-chrome https://eu-west-1.console.aws.amazon.com/ecs/v2/clusters/artilleryio-cluster/tasks

Notes

The same behavior can be observed even when running npx artillery run-fargate without docker.

@jchenseated
Copy link

This is what we have experienced as well. Due to artillery's concurrent issue, we are trying to use ioredis dependency to run stress test on Fargate, however we were getting "worker error, id: 1 Error: Cannot find module 'ioredis'" error from fargate. Seems to me that fargate does not have the right npm context except the plugins that are recognized by artillery.

What's the best practice to run with external npm dependencies? @hassy

link: https://github.com/artilleryio/artillery/tree/main/examples/using-data-from-redis

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

2 participants