Why is this a problem? Newest packages (like globby) shipped only in ESM format, so they can't be used in yarn.config.cjs.
Initial issue from yarn repo - yarnpkg/berry#5987
Root cause - zertosh/v8-compile-cache#41, missed importModuleDynamically callback.
There is no way to disable v8-compile-cache from yarn launched via corepack, users must manually add DISABLE_V8_COMPILE_CACHE=1 to their environments.
I propose to disable v8-compile-cache for yarn like that:
|
if (locator.name !== `npm` || semver.lt(locator.reference, `9.7.0`)) |
|
// @ts-expect-error - No types |
|
await import(`v8-compile-cache`); |
Or use something more complicated, like additional package.json field.
Why is this a problem? Newest packages (like globby) shipped only in ESM format, so they can't be used in yarn.config.cjs.
Initial issue from yarn repo - yarnpkg/berry#5987
Root cause - zertosh/v8-compile-cache#41, missed
importModuleDynamicallycallback.There is no way to disable v8-compile-cache from yarn launched via corepack, users must manually add
DISABLE_V8_COMPILE_CACHE=1to their environments.I propose to disable v8-compile-cache for yarn like that:
corepack/sources/corepackUtils.ts
Lines 226 to 228 in e8ae337
Or use something more complicated, like additional package.json field.