-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
CLI functionality related to aggregator preventing yarn commands 1.19-1.22 - Reverted to 1.16 #7734
Comments
For anyone that comes looking for a quick fix.. I was able to get back to a working state by installing v16.0 https://raw.githubusercontent.com/karlhorky/homebrew-core/f8bc263f93dcfd1cc50c98976a8503c8a7cb032f/Formula/yarn.rb via homebrew. I'm gonna try seeing if the update with 1.17.4 works and go as far up as I can without losing functionality.
1.17.4 continues to have lots of symlink issues which were addressed in 1.19 but is not usable currently for me. 1.16 seems more stable but is not secure... sigh. Please let me know how I can help. Need a break and will check in later. |
A clue about symlink issues while running |
From #6953 |
I think we're running into this issue at @thumbtack. In particular, this affects us when trying to upgrade a package within a workspace. This snippet should reproduce the issue: git clone [email protected]:thumbtack/thumbprint.git && cd thumbprint && yarn && cd packages/thumbprint-react && yarn upgrade @thumbtack/thumbprint-tokens --latest This is the error you'll see:
|
Confirmed that downgrading Yarn to 1.16.0 works. Thanks for digging into this, @DavideDaniel. Saved me lots of time! Here are downgrade instructions for those that installed with Homebrew: thumbtack/thumbprint#592 (comment) |
Downgrading worked for me. But I'd definitely like to see this fixed in the latest version of yarn so I'm not lagging behind by 5 minor versions... yikes! |
Downgrading to v1.19.0 worked for me. Looking forward to fix this~ |
Same here. |
Any update on this? In my (My When I try to upgrade packages (using |
I just want to hop in and clarify my situation, in case it helps anyone else. Failing CommandThe commands that were failing for me were of the Working Yarn VersionThe indicated command is FAILING for me when using Install Older YarnFirst, follow the directions here: https://yarnpkg.com/lang/en/docs/install/#debian-stable However, when it comes to the installation command, Once you install a yarn version, you may also want to consider doing a |
We are experiencing the same issue since updating to 1.21.1. Our message is as follows:
This is in a monorepo. When we downgrade to 1.19.0, the problem goes away. We don't want to do that, however, because of this recent security bulletin: https://blog.npmjs.org/post/189618601100/binary-planting-with-the-npm-cli Any suggestions? |
Also experiencing this, here's our info – happy to provide anything else that might be useful. Basic workspace monorepo, not using lerna. Yarn version: 1.21.1 In: Out: string-width is there in my node_modules. I've tried with both string-width in the main workspace node_modules and When I downgrade to 1.16.0 I can complete the install. |
My team is also experiencing this issue with version 1.21.1. However, as some other folks noted, all install commands work on prior versions (1.19.1 in our case) This is blocking us from addressing the security issue documented here: |
The same issue for our team. yarn |
|
Same issue with |
Same here.
|
same here
|
For those looking for a solution that doesn't involve changing the version of yarn you're using, editing I was having a similar issue when running |
@aryzing thanks for that suggestion and sharing a link to that post. However, in our team with use the |
Here is a stack trace (node v12.14.0 , yarn v1.21.1):
This appears to be a bug in the PackageHoister. See: Lines 855 to 872 in c43f66d
|
This is a serious issue as it effectively prevents any package from being installed. Any update on when this is supposed to be fixed? |
you can manually adjust the package.json and run yarn install. |
Any update from yarn maintainers on whether this issue is even seen or recognized? |
Just updated to |
Thanks to all the contributors to this thread, and to @friederbluemle for the npx solution. An alternative is to issue the command |
I'm experiencing an issue with difference between You could also use npx lerna add <package>[@version] --scope=<workspace> The command above will add the package to the specified workspace |
will this ever be actually fixed? |
Looks like no. They really want us to transition to yarn2 |
Same issue when using
|
Same here... downgrading to v1.19.0 really solved the problem running
|
As a warning to others, I've also discovered that Notably, that issue also appears to affect 1.19.1 and below. Running a subsequent |
The same issue for me with yarn v1.22.4 and node v14.15.4 |
If you're one of the many who are impacted by this issue, don't get your hopes up for a bugfix – Yarn 1 appears to have been quietly deprecated, and the maintainers no longer appear to be reviewing pull-requests in this repository. If Yarn 2 doesn't work for you, it's probably time to start looking at npm or pnpm. |
Open an issue with a reproduction so it can be fixed |
@merceyz I've had a pull-request open for the past 146 days that fixes this issue. It has not been reviewed or commented upon by a single member of the Yarn team. Additionally, on Jan 1, the GitHub issue template for this repository was quietly updated to mention that non-security bugfixes are no longer being considered. Please do not encourage members of the community to waste their time creating reproduction-scenarios or patches for issues that the team has directly stated they have no intention of fixing. |
Please read my comment again, I specifically quoted the part of your comment about Yarn 2 |
This issue was resolved for me by using:
Instead of:
|
how you use it when you want to install more that one package ?
not works for me. |
@andreasonny83 thanks. |
It stopped failing for me once I fixed my workspace names.
root package.json:
packages/hardhat/package.json:
I previously had named the packages just |
@elenamik Your comment helps me a lot. After I changed my root package.json name as same as sub-package's @{name}, "expected workspace package to exist for @babel/preset-env" Error disappeared. Also, I've experienced unexpected package version unsync error. I have installed jest@^26.x in root workspace, and my react-scripts@5 has nested dependency of jest@^27.x. Because of it, I got "expected workspace package to exist for jest" error message. (I've found the jest package dependency relationship by inspecting yarn.lock file). So I upgrade root workspace's jest version with equal to react-scripts@5 (jest@^27.x) After that, "expected workspace package to exist for jest" disappeared. |
🚀 fix(package.json): update project name to "eonian" to fix yarn workspace error The project name has been updated to "eonian" to fix yarnpkg/yarn#7734. Also add dependencies that create conflicts: - "glob": "^8.0.1" - "yargs": "^17.6.2" - "graphql": "^16.6.0" - "@apollo/server": "^4.6.0" - "@types/node": "^18.15.11" 🔧 feature(web): use type module for package json and fix PostCSS and Prettier configuration files to work with them
🚀 fix(package.json): update project name to "eonian" to fix yarn workspace error The project name has been updated to "eonian" to fix yarnpkg/yarn#7734. Also add dependencies that create conflicts: - "glob": "^8.0.1" - "yargs": "^17.6.2" - "graphql": "^16.6.0" - "@apollo/server": "^4.6.0" - "@types/node": "^18.15.11" 🔧 feature(web): use type module for package json and fix PostCSS and Prettier configuration files to work with them
<!-- *Before creating an issue please make sure you are using the latest version of yarn.* -->
^ Problems started with upgrading to 1.19 and then snowballed into 5 hours of hell trying to figure out what went wrong.
Do you want to request a feature or report a bug?
error An unexpected error occurred: "expected workspace package to exist for \"rimraf\""
It started with some dev dependency in a workspace repo and after messing around with nohoist settings I started noticing that the same modules keep coming up. Rimraf, inquirer, react-dev-tools.. generally things that were listed many times over in transitive dependencies. Read through many different similar issues regarding symlinks but ended up being unable to add new modules through cli which was the problem I was trying to address for automation.
What is the current behavior?
These commands do not seem to work in version
v1.19.2
throughv1.22.0-20191201.1637
:yarn workspace @scope/A add uuid lodash.get --dev
cd packages/A && yarn add uuid lodash.get --dev
yarn workspace @scope/A add js-cookie@^2.2.1 -D
cd packages/A && yarn add lodash.get@^2.2.1 --dev
Tried
yarn cache clear
, removing node_modules, reinstalling yarn to no avail.If the current behavior is a bug, please provide the steps to reproduce.
Sorry, work repos.
What is the expected behavior?
Workspaces command and yarn add should work from cli.
Please mention your node.js, yarn and operating system version.
Tested on the following:
Node:
v8.9.4
v8.15.1
v10.11.0
v10.16.0
v10.16.2
Yarn:
v1.19.2
v1.21.0
v1.22.0-20191201.1637
OS:
MacOS Mojave 10.14.6
The text was updated successfully, but these errors were encountered: