-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Add compatibility for Yarn 2.x Berry #8301
Comments
See https://gohugo.io/hugo-pipes/babel/ - without resorting to the `node-modules` plugin, sadly, Hugo pipes cannot find dependencies such as babel. It looks like this has nothing to do with `$NODE_PATH`, it is simply incompatible with Yarn Berry. I've also filed an improvement proposal under gohugo: gohugoio/hugo#8301
As a heads up for everyone, I also added hugo to the list at yarnpkg/berry#2563 babel/babel#8967 does not seem to help (using |
So, Hugo vs JavaScript vs node_modules isn't one thing. I see this is relates to Babel's config loading. I assume you would get the same troubles with PostCSS, maybe. |
Might be a good idea to put in the documentation for the pipes that yarn2 users use |
I don't know anything about Hugo, but this likely means that the PnP runtime isn't loaded when booting Babel. In general we would advise to 1/ add babel to the project's dependencies (locally, not globally, since they wouldn't be locked) 2/ tell Hugo to spawn it by using |
See https://gohugo.io/hugo-pipes/babel/ - without resorting to the `node-modules` plugin, sadly, Hugo pipes cannot find dependencies such as babel. It looks like this has nothing to do with `$NODE_PATH`, it is simply incompatible with Yarn Berry. I've also filed an improvement proposal under gohugo: gohugoio/hugo#8301
Hi there,
WIthout resorting to the
node-modules
yarn berry plugin (see https://yarnpkg.com/features/pnp ), Hugo pipes look for anode-modules
path in which dependencies are typically listed. However, Yarn 2 works slightly differently. When using yarn in conjunction with hugo extended/pipes, the following happens:This is because a
yarn install
command does NOT createnode-modules
but caches stuff locally in.yarn/cache
. See above link. This can currently be "fixed" by letting Yarn produce anode-modules
dir anyway, but it kind of defeats the purpose of using Yarn Berry.It would be cool if both tools understood each other in such a way that Hugo can leverage Yarn's caching abilities.
The text was updated successfully, but these errors were encountered: