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

Needs run bit install twice in yarn2 project to prevent yarn commands throw error. #4583

Closed
mingenesis opened this issue Jul 15, 2021 · 3 comments
Assignees
Labels

Comments

@mingenesis
Copy link

mingenesis commented Jul 15, 2021

In an empty project.

create package.json file
/* package.json */
{
"name": "bittest",
"version": "0.1.0",
"private": true,
"scripts": {
"start": "echo"
},
"dependencies": {
"typescript": "^4.3.5"
}
}

run command
% yarn set version berry

edit .yarnrc.yml file
/* .yarnrc.yml */
yarnPath: ".yarn/releases/yarn-berry.cjs"
nodeLinker: "node-modules"

run command
% bit init --harmony

edit workspace.jsonc file
/* workspace.jsonc */
...
"packageManager": "teambit.dependencies/yarn",
...

run command
% bit install
% yarn start

Internal Error: typescript@patch:typescript@^4.3.5#builtin<compat/typescript>: This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions


But when I run bit install twice, yarn command is work.

@GiladShoham
Copy link
Member

Is this harmony or a legacy workspace?
did you set the package manager in the workspace.jsonc to use yarn?

@mingenesis
Copy link
Author

mingenesis commented Jul 15, 2021

Yes, it's a harmony workspace and setted the package manager in the workspace.jsonc to use yarn. @GiladShoham

@GiladShoham GiladShoham self-assigned this Jul 19, 2021
@itaymendel
Copy link
Contributor

issue resolved for repeating installs to get all deps set correctly.

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

No branches or pull requests

3 participants