-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 does not work with workspaces and yarn pnp or pnpm without hoisting #366
Comments
Please, provide a solution suggestion |
Looks like it was broken by #345, using One possibility would be to partially undo that, but instead of Since the |
cc @JounQin
If it is just a warning, it is OK. Does it work in |
It's not just a warning. Even in node 22 the |
I have this issue with Yarn PnP and it prevents me from upgrading from v9 to v11. Are you planning to work on a solution? I do not have enough experience with node imports resolution to provide one. |
@Jul13nT I need PR for that |
The way plugins and presets are loaded works with npm's hoisting, and even works in a non-monorepo (or where size-limit and its plugins are installed in the monorepo root), but does not work when size-limit is installed in a workspace with yarn pnp or pnpm with hoisting disabled.
Reproduction
With yarn:
Create a temporary directory and cd into it.
Create the following files:
package.json
a/index.js
Contents don't matter, even an empty file is ok.
a/package.json
Run
yarn set version stable && yarn install
Run
yarn workspace a size
With pnpm:
Create a temporary directory and cd into it.
Create the following files:
package.json
.npmrc
pnpm-workspace.yaml
a/index.js
Contents don't matter, even an empty file is ok.
a/package.json
Run
pnpm install
.Run `pnpm
Expected behavior
size-limit
runs successfully.Actual behavior
With yarn:
With pnpm:
The text was updated successfully, but these errors were encountered: