From 58e5f1f989b2cea8026b9f57dce94b965f63d03e Mon Sep 17 00:00:00 2001 From: ncaq Date: Thu, 15 Oct 2020 17:51:17 +0900 Subject: [PATCH] fix(aws-lambda-nodejs): lock yarn version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit aws-lambda-nodejs have issue * [npm install -g yarn · Issue #6 · nodejs/corepack](https://github.com/nodejs/corepack/issues/6) * [npm install yarn --global fails in docker container · Issue #8358 · yarnpkg/yarn](https://github.com/yarnpkg/yarn/issues/8358) From issue comment, > For future reference, you can (should) pin your version rather than use whatever the latest is on npm (by using yarn@1.22.6, etc) - it's a good practice anyway regardless of the conditions, as you never know which bug could slip by us. You can also use the yarn-path setting to ensure that upgrades go through the appropriate review processes (including CI). > > So we'll follow it. And from issue comment, > Fwiw we don't plan to add any more features to Yarn 1, as all of our resources have shifted to Yarn 2. The past few commits have been aimed toward making the transition a bit easier, in particular thanks to the Corepack initiative which we hope will make it easier to use Yarn (both 1 & 2) by removing the need to manually install them. > > There's not much need to be concerned with the latest version of 1. --- packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile b/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile index 40081228fd554..4dc0e792a92fe 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile +++ b/packages/@aws-cdk/aws-lambda-nodejs/parcel/Dockerfile @@ -4,7 +4,7 @@ ARG IMAGE=amazon/aws-sam-cli-build-image-nodejs12.x FROM $IMAGE # Install yarn -RUN npm install --global yarn +RUN npm install --global yarn@1.22.5 # Install parcel 2 (fix the version since it's still in beta) # install at "/" so that node_modules will be in the path for /asset-input