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
Error: Cannot find module 'node:events' #12418
Comments
I have the exact same issue, using serverless 3.22 and node@12. Upgrading node to 14 also requires an update of python version and it's not possible right now for us. |
Hey @Bobby484 However, the format for importing like this node:events, is only supported from node14, hence the error. I found a workaround for it. In my buildspec.yml after installing the [email protected], I installed simple-git in it's node_modules directory.
|
Thank you so much. worked like a charm. |
Issue description
I am seeing this issue in the aws codebuild container. I have [email protected] and nodejs 12.20.0. It is very difficult for us to upgrade to nodejs 16. Is there any workaround for it? Tried downgrading simple-git 3.22.0 but no luck. Please help as it is very critical for us. I strongly believe it is something to do with simple-git package dependency. They have released version 12 days ago which is causing serverless to fail.
Error: Cannot find module 'node:events'
Require stack:
/usr/local/lib/node_modules/serverless/node_modules/simple-git/dist/cjs/index.js
/usr/local/lib/node_modules/serverless/node_modules/@serverless/dashboard-plugin/lib/deployment/parse.js
/usr/local/lib/node_modules/serverless/node_modules/@serverless/dashboard-plugin/lib/deployment/index.js
/usr/local/lib/node_modules/serverless/node_modules/@serverless/dashboard-plugin/lib/error-handler.js
/usr/local/lib/node_modules/serverless/node_modules/@serverless/dashboard-plugin/lib/plugin.js
/usr/local/lib/node_modules/serverless/node_modules/@serverless/dashboard-plugin/index.js
/usr/local/lib/node_modules/serverless/lib/cli/handle-error.js
/usr/local/lib/node_modules/serverless/scripts/serverless.js
Context
I am still seeing this issue in aws codebuild container. I have [email protected] and nodejs 12.20.0. It is very difficult for us to upgrade to nodejs 16. Is there any workaround on it? Tried downgrading simple-git 3.22.0 but no luck. Please help as it is very critical for us.
The text was updated successfully, but these errors were encountered: