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

Yarn add issues with workspaces and eslint #8405

Closed
felipepsq opened this issue Oct 22, 2020 · 9 comments
Closed

Yarn add issues with workspaces and eslint #8405

felipepsq opened this issue Oct 22, 2020 · 9 comments
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.

Comments

@felipepsq
Copy link

Bug description

Using latest version (1.22.10) and workspaces, when typing yarn add package in any workspace, it throws the following error:

error An unexpected error occurred: "expected workspace package to exist for \"eslint\"".

Setting yarn policies to 1.19.0 solved the problem.

Command

 yarn policies set-version 1.19.0

Environment

  • Yarn version: 1.22.10 (now 1.19.0)
  • Node version: 12.18.4
  • Platform: linux x64
@Megajin
Copy link

Megajin commented Jan 30, 2021

You Sir, are a lifesaver! Props to you!

@merceyz
Copy link
Member

merceyz commented Jan 31, 2021

Closing as fixed in v2

https://yarnpkg.com/getting-started/migration

@merceyz merceyz closed this as completed Jan 31, 2021
@merceyz merceyz added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 31, 2021
petermetz added a commit to petermetz/cacti that referenced this issue Jul 23, 2021
Needed to downgrade because of a bug in 1.22.10 where it was
unable to install dependencies into workspaces individually.

See details here: yarnpkg/yarn#8405

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz added a commit to hyperledger-cacti/cacti that referenced this issue Jul 28, 2021
Needed to downgrade because of a bug in 1.22.10 where it was
unable to install dependencies into workspaces individually.

See details here: yarnpkg/yarn#8405

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
hanxu12 pushed a commit to hanxu12/cactus that referenced this issue Aug 9, 2021
Needed to downgrade because of a bug in 1.22.10 where it was
unable to install dependencies into workspaces individually.

See details here: yarnpkg/yarn#8405

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Signed-off-by: hxlaf <xuhan@lafayette.edu>
@faq885
Copy link

faq885 commented Sep 7, 2021

Awesome, you rock man!!

@EWL0829
Copy link

EWL0829 commented Oct 20, 2021

Nice!!!

RafaelAPB pushed a commit to RafaelAPB/blockchain-integration-framework that referenced this issue Mar 9, 2022
Needed to downgrade because of a bug in 1.22.10 where it was
unable to install dependencies into workspaces individually.

See details here: yarnpkg/yarn#8405

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
@rendybiz
Copy link

rendybiz commented Apr 22, 2022

It's 2022, and an error like this happened again.
An unexpected error occurred: "expected workspace package to exist for \"@jest/transform\"".
And is solved by downgrading my Yarn into 1.19

Command

yarn policies set-version 1.19.1
It's weird but keep it as is for now.

@ladifire
Copy link

Thank you very much. You saved my life!

@luke-dcz
Copy link

luke-dcz commented Dec 7, 2022

Downgrading the yarn version could be risky as there are bug fixes in each new release. However, I found an alternative that solved the issue:
In the root package.json, updating lerna to the latest version (currently 6.1.0) and nx (15.3.0) solves this without risking downgrading yarn.

@hututuhu
Copy link

Bug description

Using latest version (1.22.10) and workspaces, when typing yarn add package in any workspace, it throws the following error:

error An unexpected error occurred: "expected workspace package to exist for \"eslint\"".

Setting yarn policies to 1.19.0 solved the problem.

Command

 yarn policies set-version 1.19.0

Environment

  • Yarn version: 1.22.10 (now 1.19.0)
  • Node version: 12.18.4
  • Platform: linux x64

It solved But my eslint no longer work :(

@iway1
Copy link

iway1 commented Dec 19, 2023

Closing as fixed in v2

no one uses v2

shirakaba added a commit to scoville/react-native-app-auth that referenced this issue Jul 22, 2024
shirakaba added a commit to scoville/react-native-app-auth that referenced this issue Jul 22, 2024
shirakaba added a commit to scoville/react-native-app-auth that referenced this issue Jul 22, 2024
shirakaba added a commit to scoville/react-native-app-auth that referenced this issue Jul 27, 2024
shirakaba added a commit to scoville/react-native-app-auth that referenced this issue Aug 18, 2024
shirakaba added a commit to scoville/react-native-app-auth that referenced this issue Aug 18, 2024
shirakaba added a commit to scoville/react-native-app-auth that referenced this issue Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed-in-modern This issue has been fixed / implemented in Yarn 2+.
Projects
None yet
Development

No branches or pull requests

11 participants