-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Bug?]: node 16.17.0 update cause yarn 3.2.2 build to fail #4778
Comments
This is probably due to this change in 16.17: https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V16.md#experimental-esm-loader-hooks-api
It looks like it's fixed in Yarn 4's ESM loader though - maybe that can be backported to v3 as well? |
This got fixed in 3.2.2. Are you sure you are using this version? Did you run |
@arcanis I get the same error as @shestakov-bc (yarn 3.2.2). Works on 16.16.0, fails on 16.17.0 |
I can't reproduce:
|
I'm would guess the "automated build environment" has some sort of caching that isn't behaving correctly, does it work on your local machine? |
I got the same error on Node >= 16.17 even on Yarn 3.2.2:
However, I started out with Yarn 3.2.0 and that's the version that generated the |
thanks @Wedvich maybe deleting |
I can't contribute much to this -- Node/Yarn is part of our stack but not my area of expertise -- but I can say this only recently began to affect us, too. It first showed up in our Github bors testing pipeline and is also happening on my local Windows/WSL2/Ubuntu 20.04 environment. It's even happening on weeks-old commits that tested fine at the time so it's got to be something discreetly introduced outside our stack. Sorry I can't add anything substantive but I'm eagerly watching the thread. |
Had the same issue, upgrading to yarn 3.2.2 and running |
Turns out we don't even commit I think Yarn 3.2.2 is fine and this issue can be closed. If/when we figure out our issue, I'll post it here for anyone who will encounter same problem. |
Just to finish off my post, we had the problem similarly go away once we got Yarn upgraded to 3.2.2. That said, while we found a solution, I'm still unnerved not knowing the cause of the problem. The problem retroactively affected weeks-old commits that, at the time of their commits, tested and functioned perfectly fine. Whatever happened seems to reveal a potential crack in the idea that once a release tests successful we can trust it to be good indefinitely. |
@Rikaelus You updated Node.js, most likely to 16.17.0, which changed how the experimental loaders behave. |
I'm still seeing this even when deleting .pnp.loader.mjs , with updating to yarn 3.2.2... I will try and add more troubleshooting details but seems like issue persists. |
I'm running into this problem with one of my repos. It appears that the problem might be related to experimental changes to the ESM Loader Hooks API in Node 16.17.0 in this PR. Pinning my Node version to 16.16.0 solves the problem for now. I don't have the time to dig deeper, but at first glance, it appears this is a breaking change to Node, since it breaks existing loaders that have not yet updated to signal a short circuit when not calling the next loader. |
If you want those sorts of guarantees you must keep your entire stack under control. I recommend using Nix for that. |
This comment was marked as spam.
This comment was marked as spam.
It's a node version issue. I'm using now nvm with a node@16.15.1 an it works well now |
It works to me! thx :) |
Self-service
Describe the bug
I apologize, I cannot provide too much information about our project, I hope other people who get here will be able to add to this. I'm reporting this, since you requested it in other issue, but sorry if this is not enough info.
Our yarn build of typescript react app is part of ubuntu image build and we are using Jenkins and CMake. We are installing node from
https://deb.nodesource.com/setup_16.x
which yesterday got updated from 16.16.x to 16.17.0.Our project was using 3.2.1. After we found someone reported same issue on node 18, we found a suggestion to try
However build is still failing on yarn 3.2.2 using node 16.17.0 with the following error logs:
Our only solution for now is to downgrade node to use 16.16.x during the build. Would be nice to have this resolved so we could go back to using latest stable node.
In other thread you have mentioned that it should be fixed. I wonder if there's something else need to be done, since we upgraded from 3.2.1 instead of having project on 3.2.2 from the start?
To reproduce
I'm sorry that I cannot provide more info about our project, other than this brief description:
https://deb.nodesource.com/setup_16.x
yarn set version stable && yarn install
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: