We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm unable to use moduleDirectories specification when deploying code to AWS Lambda
I believe bug is in this function
function getMainModule () { return require.main._simulateRepl ? undefined : require.main }
Error I get is:
2022-11-12T00:51:00.555Z undefined ERROR Uncaught Exception { "errorType": "TypeError", "errorMessage": "Cannot read properties of undefined (reading '_simulateRepl')", "stack": [ "TypeError: Cannot read properties of undefined (reading '_simulateRepl')", " at getMainModule (/var/task/node_modules/module-alias/index.js:216:23)", " at addPath (/var/task/node_modules/module-alias/index.js:85:22)", " at /var/task/node_modules/module-alias/index.js:210:7", " at Array.forEach (<anonymous>)", " at init (/var/task/node_modules/module-alias/index.js:206:35)", " at Object.<anonymous> (/var/task/node_modules/module-alias/register.js:1:13)", " at Module._compile (node:internal/modules/cjs/loader:1105:14)", " at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)", " at Module.load (node:internal/modules/cjs/loader:981:32)", " at Function.Module._load (node:internal/modules/cjs/loader:822:12)" ] }
Seems fix should be to rewrite the method as:
function getMainModule () { return require.main && require.main._simulateRepl ? undefined : require.main }
The text was updated successfully, but these errors were encountered:
Hey @allenada 👋
Isn't moduleDirectories a Jest thing?
moduleDirectories
In any case, would you care to open a pull request for this?
Sorry, something went wrong.
No branches or pull requests
I'm unable to use moduleDirectories specification when deploying code to AWS Lambda
I believe bug is in this function
Error I get is:
Seems fix should be to rewrite the method as:
The text was updated successfully, but these errors were encountered: