Open vetan2 opened 2 years ago
In your preBuild phase you can enable yarn berry by adding the following commands:
phases:
preBuild:
commands:
- yarn set version 3.2.1 # This enables yarn berry and all commands after this will use that
- yarn config set nodeLinker node-modules # if you use node modules else remove it if you use pnp
- yarn install
Is this a dead feature request?
actually i managed to do it easily by modifying the build script
Here is what I used:
// amplify.yml
version: 1
frontend:
phases:
preBuild:
commands:
- nvm use 20
- corepack enable
- yarn set version stable
- yarn install
build:
commands:
- yarn run build
artifacts:
baseDirectory: build
files:
- '**/*'
cache:
paths:
- node_modules/**/*
Describe the solution you'd like I'd like to use yarn berry because of its better building speed due to zero-install. But currently yarn version is fixed to 1.22.15. I have tried setting node version to 16 then running
corepack enable
, or tried setting yarn version to 3.2.1 in Build image settings. But those did not work.