[Bug?]: Portal doesn't find node binaries #4443
Labels
bug
Something isn't working
unreproducible
This issue cannot be reproduced on master
upholded
Real issues without formal reproduction
Self-service
Describe the bug
Hi!
As a preface: I'm not 100% sure if this is a bug with yarn or Parcel but the current information presented to me leads me to believe that it's an issue with yarn. Hopefully we can figure it out!
So, let's get into it.
Description
I was trying to update Parcel to 2.5.0 in my PR gatsbyjs/gatsby#35446 that was based on renovate's PR gatsbyjs/gatsby#35307 to update Parcel to 2.4.1. Both PRs fail in our yarn PnP CI: https://app.circleci.com/pipelines/github/gatsbyjs/gatsby/82291/workflows/f57735e2-46c7-4a3d-ad8e-fecdd0580030/jobs/977309
So this happens both on the update from Parcel 2.3.2 -> 2.4.1 and 2.3.2 -> 2.5.0. We've gone through the changelog and couldn't find any related change (other than maybe parcel-bundler/parcel#7846) that could trigger this in Parcel?
Error:
So we ssh'ed into the CircleCI instance, ran it again, and it still failed. We used
yarn unplug
and looked at the files that it says are missing, but they were there. Odd 🤔Local Reproduction
Ok, so we went onto trying to reproduce this locally. And we saw two behaviors. We followed what our CI is doing first:
https://github.com/gatsbyjs/gatsby/blob/3beb047b05218eeef133f8a87e4019399fded34a/.circleci/config.yml#L320-L358
This is also what I'll write in the "To reproduce" field. Because our CI uses
yarn link --all --private ~/project
to create a portal in the example project to all deps of the monorepo. You can see the result of that here: https://github.com/LekoArts/pnp-bug-repro-01Then as a second test we just cloned the starter project and used
resolutions
to force update the Parcel dependencies. Since essentially this is only what the PR is doing. And et voilà, it works! You can find a repository here: https://github.com/LekoArts/pnp-bug-repro-02When not using Portals, but just
resolutions
this error doesn't appear.Now the question is: Why is that happening?
To reproduce
parcel-move-plugin
, and runyarn bootstrap
. This should install all dependencies and build all packagesyarn link --all --private ~/project
with~/project
being the absolute path to your local repository of Gatsby you created in step 1. You can also skip the stepyarn add start-server-and-test@^1.11.0
yarn build
and you should see the same errorEnvironment
Please note that this also happens on our CircleCI instance. System: OS: macOS 12.3.1 CPU: (10) arm64 Apple M1 Pro Binaries: Node: 16.13.0 - /private/var/folders/h2/tzzmmt7s3bl2l2kbnvnhv5r40000gn/T/xfs-d4034098/node Yarn: 3.2.0 - /private/var/folders/h2/tzzmmt7s3bl2l2kbnvnhv5r40000gn/T/xfs-d4034098/yarn npm: 8.5.5 - ~/.nvm/versions/node/v16.13.0/bin/npm
Additional context
No response
The text was updated successfully, but these errors were encountered: