Open eredzik opened 3 months ago
Just stumbled into this problem myself while evaluating the Console. Autodeploy uses yarn v1 whereas my project uses yarn v4. That's a huge difference. Yarn 1 classic is quite dated, I'd also like you to support the new one too.
I've tried freezing version like this in package.json but it did not help:
"volta": {
"node": "20.17.0",
"yarn": "4.5.0"
},
"packageManager": "yarn@4.5.0",
"engines": {
"node": ">=20.17.0",
"yarn": "4.5.0"
}
I got this error first:
Failed to run: yarn install --frozen-lockfile
And after adding the versions above this error:
Failed to run: npm install -g yarn@4.5.0
Problem was initially submitted in following issue
It still persists, just came back to autodeploy run again and found error as such:
19:11:36.498 HEAD is now at 918c50f ci: updated test db instance 19:11:36.498 Running: npm install -g yarn@4.2.2 19:11:37.654 npm ERR! code ETARGET 19:11:37.654 npm ERR! notarget No matching version found for yarn@4.2.2. 19:11:37.654 npm ERR! notarget In most cases you or one of your dependencies are requesting 19:11:37.654 npm ERR! notarget a package version that doesn't exist. 19:11:37.654 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2024-08-05T17_11_35_625Z-debug-0.log 19:11:37.654 Error: Failed to run: npm install -g yarn@4.2.2 19:11:37.654 at shell (file:///tmp/buildspec/index.mjs:242:13) 19:11:37.654 at install (file:///tmp/buildspec/index.mjs:172:9) 19:11:37.654 at workflow (file:///tmp/buildspec/index.mjs:159:9) 19:11:37.654 at runWorkflow (file:///tmp/buildspec/index.mjs:164:11) 19:11:37.654 at handler (file:///tmp/buildspec/index.mjs:48:11) 19:11:37.654 at async file:///tmp/buildspec/[eval1]:1:122 It is caused by yarn having two releases - classic which is on npm as versions 1.2.x and latest yarn which is a bit disconnected from yarn classic and installed through corepack which is shipped with npm. More about how to install latest yarn here: https://yarnpkg.com/getting-started/install
I think it would be the best to support this feature by using corepack.