-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
nx migrate fails with Yarn berry #16338
Comments
I use yarn 3.3.x and also 3.5.x and all works good |
Also having the same issue. Tried doing it from v15 then manually upgraded to v16 and tried it, same result as above: On yarn 3.5.1.
|
I have the same issue. Any news? > NX Report complete - copy this into the issue template
Node : 18.15.0
OS : darwin x64
yarn : 3.5.1
nx : 15.9.0
@nrwl/js : 15.9.0
@nrwl/jest : 15.9.0
@nrwl/linter : 15.9.0
@nrwl/workspace : 15.9.0
@nrwl/cli : 15.9.0
@nrwl/cypress : 15.9.0
@nrwl/devkit : 15.9.0
@nrwl/eslint-plugin-nx : 15.9.0
@nrwl/react : 15.9.0
@nrwl/tao : 15.9.0
@nrwl/vite : 15.9.0
typescript : 4.9.5 |
I have the same issue, any updates on this? > NX Report complete - copy this into the issue template
Node : 18.16.0
OS : darwin arm64
yarn : 3.2.4
nx : 15.6.3
@nrwl/angular : Not Found
@nrwl/cypress : 15.6.3
@nrwl/detox : Not Found
@nrwl/devkit : 15.6.3
@nrwl/esbuild : Not Found
@nrwl/eslint-plugin-nx : 15.6.3
@nrwl/expo : Not Found
@nrwl/express : 15.6.3
@nrwl/jest : 15.6.3
@nrwl/js : 15.6.3
@nrwl/linter : 15.6.3
@nrwl/nest : Not Found
@nrwl/next : 15.6.3
@nrwl/node : 15.6.3
@nrwl/nx-cloud : 15.0.3
@nrwl/nx-plugin : Not Found
@nrwl/react : 15.6.3
@nrwl/react-native : Not Found
@nrwl/rollup : 15.6.3
@nrwl/schematics : Not Found
@nrwl/storybook : 15.6.3
@nrwl/web : 15.6.3
@nrwl/webpack : 15.6.3
@nrwl/workspace : 15.6.3
@nrwl/vite : Not Found
typescript : 4.9.3 |
For me temporarily switching node versions from 16 to 20 fixed it |
same issue trying to upgrade from nx 14 to nx 16, using yarn 3.6:
|
Same issue for me:
|
unfortunately not for me. Still failing with:
Would be really nice to get some input from the NX team on this... but then they also have more than 500 open issues :-( Also get this after manually updating packages to @nx16... |
Was able to get this to work by directly running |
I have the same issue but the workaround works: yarn nx report
> NX Report complete - copy this into the issue template
Node : 18.12.1
OS : darwin arm64
yarn : 3.5.1
Hasher : Native
nx : 16.3.2
@nx/workspace : 16.3.2
@nx/devkit : 16.3.2
@nrwl/tao : 16.3.2
nx-cloud : 16.0.5
typescript : 4.9.5 |
Same issue happened to me as well when running the following. I was trying to upgrade from
I took #16338 (comment) as a workaround and it pass.
Our project is a micro-frontend mono-repo based application. It has a container with main menu and user preferences, for the logged in user - this is the "host". Each page is developed by a deferent team and is a "remote" application.
|
There's another workaround that's setting I think the issue is that yarn defaults to pnp mode when used by nx, and it doesn't read your local .yarnrc file to check settings. |
Interesting. I have the node linker mode set to This suggests that the problem may be reproducible in Nx's automated testing in CI by running yarn with a few different configurations. |
This fails with PNP enabled, as there is no It is very annoying, but the "workaround" of falling back on node_modules via the
(the last yarn just deletes all the node_modules that are not necessary because PNP) |
Still fails applying migrations with these workarounds. Yarn 3.4.1, Nx 16.7.2, Node 18.13.0. Edit: |
@pongells' solution worked for me, |
TL; DR; WorkaroundFor everyone affected by this problem, please follow the workaround proposed by @arvidboivie to use environment variable override. This is needed only for the YARN_NODE_LINKER="node-modules" yarn nx migrate latest
yarn # no env var needed
YARN_NODE_LINKER="node-modules" yarn nx migrate --run-migrations More detailsWhen running If you use Yarn Berry with Based on your repo, SolutionNow that we know the problem, we'll see the fix is implemented as soon as possible. Sorry for the delay. Thank you all for your contribution to clarification of this issue. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Running
nx migrate latest
withyarn@3.5.0
fails.Expected Behavior
nx migrate latest
should run without any errorsGitHub Repo
https://github.com/nrwl/nx-examples
Steps to Reproduce
Run the following commands (assuming volta is installed)
volta install yarn@3
yarn
nx migrate latest
Nx Report
Failure Logs
Additional Information
After checking the temporary folders listed in the errors, there is no
node_modules
folder.The text was updated successfully, but these errors were encountered: