An error occurs when bundling JavaScript via Browserify preprocessor
Error: Can't walk dependency graph: ENOENT: no such file or directory, lstat '/Users/Anna_Mkrtchyan/WebstormProjects/cypress-cucumber-browserify-amplify-issue/process'
required by /Users/Anna_Mkrtchyan/WebstormProjects/cypress-cucumber-browserify-amplify-issue/node_modules/@aws-sdk/client-lex-runtime-v2/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
Desired behavior
I should be able to bundle JS code with browserify when using aws-amplify to authorize my Cognito user in autotests.
Create cypress.env.json file in the project's root directory and add Cognito user credentials to it. It should look like
{
"PASSWORD": "",
"USERNAME": "",
"POOL_ID": "",
"CLIENT_ID": ""
}
Run code - npm test
Notes
I simplified the code to the minimum reproducible state. Removed Cucumber related code.
Issue started to occur since aws-amplify v4.3.8.
The file mentioned in the error log is unnecessary and unknown for the project.
Current behavior
An error occurs when bundling JavaScript via Browserify preprocessor
Error: Can't walk dependency graph: ENOENT: no such file or directory, lstat '/Users/Anna_Mkrtchyan/WebstormProjects/cypress-cucumber-browserify-amplify-issue/process' required by /Users/Anna_Mkrtchyan/WebstormProjects/cypress-cucumber-browserify-amplify-issue/node_modules/@aws-sdk/client-lex-runtime-v2/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js
Desired behavior
I should be able to bundle JS code with browserify when using aws-amplify to authorize my Cognito user in autotests.
Test code to reproduce
Notes
Versions
Checklist
cypress-cucumber-preprocessor@4.3.1
(package name has changed and it is no longer the most recent version, see #689).