-
Notifications
You must be signed in to change notification settings - Fork 489
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
Cannot find module run-fargate.js on a Multiple Scenario specs. #2590
Comments
saurabhmarwaha
changed the title
Cannot find module run-fargate.js
Cannot find module run-fargate.js on a Multiple Scenario specs.
Mar 21, 2024
Hello @saurabhmarwaha and anyone else reading here 👋 Since Artillery 2.0.14, we've changed the way Lambda works. You shouldn't run into these issues anymore. Can you please upgrade and see if you still run into any issues? Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue: Cannot find module run-fargate.js on a Multiple Scenario specs. Note: If I keep the config and scenario in one file, it works.
Am I giving a wrong execution command?
Followed: https://github.com/artilleryio/artillery/tree/main/examples/multiple-scenario-specs
Summary:
Trying to execute simple script that hits http endpoint which executes perfectly fine locally, but when I try to scale using AWS Lambda, I am getting an issue 'module not found' (run-fargate.js).However, not sure why it's looking for run-fargate module when ideally it should call run-lambda.js which is also in lib/cmds folder.
Also, notice that it doesn't bundle
Version info:
Running this command:
Error:
[MODULE_NOT_FOUND] ModuleLoadError Plugin: artillery: [MODULE_NOT_FOUND] require failed to load /var/task/node_modules/artillery/lib/cmds/run-fargate.js: Cannot find module 'rc'\n"
Terminal:
Powershell with Set-ExecutionPolicy RemoteSigned
Also tried on bash terminal
Execution
Test run id: tqy53_6qhqhn9j4eq5ertgbhezegb5zd57x_hyem
NOTE: AWS Lambda support is experimental. Not all Artillery features work yet.
For details please see https://docs.art/aws-lambda
λ Creating AWS Lambda function...
Preparing AWS environment...
[d45553d2-2aef-4a13-b1cc-62d02a9f029f]: A Lambda function has exited with an error. Reason: ArtilleryError
{
stdout: 'Test run id: tqy53_6qhqhn9j4eq5ertgbhezegb5zd57x_hyem\n',
stderr: "(node:25) [MODULE_NOT_FOUND] ModuleLoadError Plugin: artillery: [MODULE_NOT_FOUND] require failed to load /var/task/node_modules/artillery/lib/cmds/run-fargate.js: Cannot find module 'rc'\n"
'- /var/task/node_modules/artillery/lib/platform/aws-ecs/legacy/run-cluster.js\n' +
'- /var/task/node_modules/artillery/lib/cmds/run-fargate.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/module-loader.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/help/util.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/help/formatter.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/help/command.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/help/index.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/flags.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/cli-ux/styled/table.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/cli-ux/styled/index.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/cli-ux/index.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/command.js\n' +
'- /var/task/node_modules/artillery/node_modules/@oclif/core/lib/index.js\n' +
'- /var/task/node_modules/artillery/bin/run\n' +
'module: @oclif/[email protected]\n' +
'task: toCached\n' +
'plugin: artillery\n' +
'root: /var/task/node_modules/artillery\n' +
'See more details with DEBUG=*\n' +
'(Use
node --trace-warnings ...
to show where the warning was created)\n' +' Error: ENOENT: no such file or directory, open \n' +
" 'scenarios\backend-endpoint-matrix.yml'\n" +
' Code: ENOENT\n' +
"[Error: ENOENT: no such file or directory, mkdir '/home/sbx_user1051'] {\n" +
' errno: -2,\n' +
" code: 'ENOENT',\n" +
" syscall: 'mkdir',\n" +
" path: '/home/sbx_user1051'\n" +
'}\n'
}
Summary report @ 20:29:31(-0400)
No measurements recorded during this period
Estimated AWS Lambda cost for this test: $0.001
Files being used:
Package.json attached.
package.json
Node_modules installed. See SS
Cloudwatch Logs
2024-03-21T06:23:32.382Z 9b0dee15-735e-41f5-9a72-eefd4a4672ae ERROR (node:24) [MODULE_NOT_FOUND] ModuleLoadError Plugin: artillery: [MODULE_NOT_FOUND] require failed to load /var/task/node_modules/artillery/lib/cmds/run-fargate.js: Cannot find module 'rc'
Require stack:
module: @oclif/[email protected]
task: toCached
plugin: artillery
root: /var/task/node_modules/artillery
See more details with DEBUG=*
(Use
node --trace-warnings ...
to show where the warning was created)The text was updated successfully, but these errors were encountered: