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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add packages or plugins | expected workspace package to exist for X #6416

Closed
TejasQ opened this issue Jul 9, 2021 · 13 comments 路 Fixed by #6442
Closed

Unable to add packages or plugins | expected workspace package to exist for X #6416

TejasQ opened this issue Jul 9, 2021 · 13 comments 路 Fixed by #6442
Labels
bug Something isn't working

Comments

@TejasQ
Copy link
Contributor

TejasQ commented Jul 9, 2021

Current Behavior

image

I try to yarn add @backstage/plugin-catalog-backend-module-ldap and it errors because apparently I need css-loader installed in my workspace. 馃

Expected Behavior

The plugin just installs without error.

Steps to Reproduce

Create a new backstage app and try to yarn add @backstage/plugin-catalog-backend-module-ldap in packages/backend.

Context

I'm trying to import users and groups from an LDAP-compatible service. I tried step 1 of the official documentation and failed.

Your Environment

  • NodeJS Version (v12): 14.16.1
  • Operating System and Version (e.g. Ubuntu 14.04): macOS Big Sur
  • Browser Information: N/A
@TejasQ TejasQ added the bug Something isn't working label Jul 9, 2021
@benjdlambert
Copy link
Member

This is actually something that effects all installs of things in the workspace. Been unable to work out what the issue is though. @OrkoHunter I think had a workaround, but you can add the package explicitly in the package.json manually and run yarn install for now

@OrkoHunter
Copy link
Member

Yeah, this is so annoying! Affecting both the mono-repo and generated Backstage apps as well.

@OrkoHunter OrkoHunter changed the title LDAP backend module plugin does not install as expected Unable to add packages or plugins | expected workspace package to exist for X Jul 9, 2021
@benjdlambert
Copy link
Member

OK - So I did some git bisect magic between a working revision and master using a git bisect run to run a simple yarn add in catalog. Turns out it's this commit: 613e46d or #6290 which makes sense as we've shipped this to users too.

Need to write a resolution override to test but first 馃

@benjdlambert
Copy link
Member

So I'm not sure where the css-loader comes into this, so there could be an extra dependency that got upgraded and broke this too, but I remember it being related to jsonfile too which this dependency seems to change. So let's see if this PR can help.

@benjdlambert
Copy link
Member

Gonna keep this open until we do a release and confirm it fixed the issue. Think it's fixed on master now at least.

@benjdlambert
Copy link
Member

Could be related breaking change for create-app installs also #6253

@benjdlambert
Copy link
Member

Maybe we should consider updating yarn too if this is going to happen for any new major version change of a library too. Can't keep rolling back stuff, especially when there might be security fixes in dependencies.

@benjdlambert
Copy link
Member

Just following up with this, looks like upgrading to latest 1.x release of yarn doesn't help, but updating to berry (2.x) seems to fix the issue too and I can install as expected. Maybe we can fix this short term for now, but look at moving to 2.x otherwise I think this is going to keep cropping up and causing issues blocking us from upgrading versions.

@Rugvip I know you had some thoughts on berry or had tried it, what were your findings?

@jrusso1020
Copy link
Contributor

jrusso1020 commented Jul 13, 2021

one thing to note on berry @benjdlambert is that it doesn't work with dependabot yet sadly, so you will lose dependabot if you upgrade yarn to 2.X. dependabot/dependabot-core#1297

Dependabot will still open PR's for version updates though it just doesn't update dependencies correctly, so my workaround in another project was to let it open up PR's and then I would manually update them myself and merge. Although this may be more difficult for a project of this size

@stale
Copy link

stale bot commented Sep 11, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 11, 2021
@benjdlambert
Copy link
Member

I'm gonna go ahead and close this for now as I've not seen this come up since we rolled back the fs-extra changes. Although we should look moving to berry once there's an upgrade path that doesn't see us lose functionality.

@stale stale bot removed the stale label Sep 13, 2021
@Vernon-van-der-Merwe
Copy link

Hello Guys!

Seems like this issue might still be happening.
im using yarn@1.22.17.

And this is my err after running the yarn command

[1/4] 馃攳  Resolving packages...
[2/4] 馃殮  Fetching packages...
[3/4] 馃敆  Linking dependencies...
error An unexpected error occurred: "expected workspace package to exist for \"@vercel/style-guide\"".
info If you think this is a bug, please open a bug report with the information provided in "/Users/vernon/Desktop/my-turborepo/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.```

@freben
Copy link
Member

freben commented Oct 9, 2023

We ourselves are using 3.2.3 in the main repo. Any chance of upgrading?

https://github.com/backstage/backstage/tree/master/.yarn/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants