Skip to content
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

Autodeploy fails when using yarn berry #17

Closed
eredzik opened this issue Jul 9, 2024 · 3 comments
Closed

Autodeploy fails when using yarn berry #17

eredzik opened this issue Jul 9, 2024 · 3 comments
Assignees

Comments

@eredzik
Copy link

eredzik commented Jul 9, 2024

When running autodeploy on repo configured to use yarn berry (package has key packageManager set to [email protected] i receive

12:53:36.146
�[0;32mSuccessfully added �[38;2;255;140;0mSST ❍ ion �[0;32mto $PATH in /root/.bashrc�[0m
12:53:36.146
Running: yarn install
12:53:36.715
error This project's package.json defines "packageManager": "[email protected]". However the current global version of Yarn is 1.22.22.
12:53:36.715
Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
12:53:36.715
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out https://yarnpkg.com/corepack.
12:53:36.715
Error: Failed to run: yarn install
12:53:36.715
    at shell (file:///tmp/buildspec/index.mjs:229:13)
12:53:36.715
    at install (file:///tmp/buildspec/index.mjs:169:37)
12:53:36.715
    at workflow (file:///tmp/buildspec/index.mjs:159:9)
12:53:36.715
    at runWorkflow (file:///tmp/buildspec/index.mjs:163:11)
12:53:36.715
    at handler (file:///tmp/buildspec/index.mjs:44:11)
12:53:36.715
    at async file:///tmp/buildspec/[eval1]:1:122

Expected behavior:
Console should run corepack enable so that corepack can resolve package manager version correctly.

@jayair
Copy link
Contributor

jayair commented Jul 13, 2024

Hmm we'll take a look.

@fwang
Copy link
Contributor

fwang commented Jul 19, 2024

Just release a Console update. And it will now respect packageManager in ur package.json.

Feel free to re-open if error persists.

@fwang fwang closed this as completed Jul 19, 2024
@eredzik
Copy link
Author

eredzik commented Aug 5, 2024

Problem 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 [email protected]
19:11:37.654
npm ERR! code ETARGET
19:11:37.654
npm ERR! notarget No matching version found for [email protected].
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 [email protected]
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants