-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Add support for nodejs16.x #274
base: master
Are you sure you want to change the base?
Conversation
@alixaxel It would be awesome to get this one merged so that we are able to run on the latest runtime 🙏 |
We would be really grateful if this can be merged, it's blocking us from upgrading our infra on Lambda. 🙏 |
Please merge it, as it's crucial for to use it with Node.js v16. |
We need this as well. It would be really great if @alixaxel could merge it. Thank you! |
It would be really great |
@alixaxel is this repo maintained? Any reason why so much delay with merging this update? Almost 2 months... |
Works like a charm. I use patch-package with the following patch file as a workaround for now: diff --git a/node_modules/chrome-aws-lambda/build/index.js b/node_modules/chrome-aws-lambda/build/index.js
index f78e183..599af55 100644
--- a/node_modules/chrome-aws-lambda/build/index.js
+++ b/node_modules/chrome-aws-lambda/build/index.js
@@ -7,7 +7,7 @@ const fs_1 = require("fs");
const lambdafs_1 = __importDefault(require("lambdafs"));
const path_1 = require("path");
const url_1 = require("url");
-if (/^AWS_Lambda_nodejs(?:10|12|14)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
+if (/^AWS_Lambda_nodejs(?:10|12|14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
if (process.env.FONTCONFIG_PATH === undefined) {
process.env.FONTCONFIG_PATH = '/tmp/aws';
}
@@ -145,7 +145,7 @@ class Chromium {
lambdafs_1.default.inflate(`${input}/chromium.br`),
lambdafs_1.default.inflate(`${input}/swiftshader.tar.br`),
];
- if (/^AWS_Lambda_nodejs(?:10|12|14)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
+ if (/^AWS_Lambda_nodejs(?:10|12|14|16|18)[.]x$/.test(process.env.AWS_EXECUTION_ENV) === true) {
promises.push(lambdafs_1.default.inflate(`${input}/aws.tar.br`));
}
return Promise.all(promises).then((result) => result.shift()); Save this file in your project as patches/chrome-aws-lambda+10.1.0.patch, install "scripts": {
+ "postinstall": "patch-package"
} |
@Edweis are you going to maintain this project since I see you approved the PR? Can you merge it? I switched using https://github.com/Sparticuz/chrome-aws-lambda since @Sparticuz currently maintains it. |
Hi @urish, looking to try this approach in the short term till this gets commited. I get using patch-package, I'm a little confused on what constitutes "the following patch file" in your example - is it, literally, copying the code segment in your example to patches/chrome-aws-lambda+10.1.0.patch? Or copying the entire updated file from the commit on github? Thanks! |
Would be great to merge this, is there anything blocking this PR? would be happy to help if there is |
can we get this merged please? |
@truuth-of-abhi I don't think the repository is maintained anymore, better to switch to this fork: https://github.com/Sparticuz/chrome-aws-lambda |
The latest repository is https://www.npmjs.com/package/@sparticuz/chromium. |
This PR upgrades test fixtures from Node.js 14 to 16 and also removes the `35-puppeteer` test fixture since it doesn't support Node.js 16 unfortunately. - See alixaxel/chrome-aws-lambda#274 --------- Co-authored-by: Steven <[email protected]>
This PR upgrades test fixtures from Node.js 14 to 16 and also removes the `35-puppeteer` test fixture since it doesn't support Node.js 16 unfortunately. - See alixaxel/chrome-aws-lambda#274 --------- Co-authored-by: Steven <[email protected]>
https://aws.amazon.com/about-aws/whats-new/2022/05/aws-lambda-adds-support-node-js-16/