You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am stumped trying to run AVA on Yarn PnP and wondering how feasible it currently is, whether there may be some insight I missed, or how I might go about adding native support for PnP to AVA. I ran into chalk/chalk#531 and worked around it as described on that thread. That got AVA to load, but it crashes on the first import.
In PnP, most Node.js commands work by running yarn <command>, which pretty much just runs node --require "$(pwd)/.pnp.cjs" <command>. See the excerpt from Yarn's documentation below for a brief discussion of the purpose of .pnp.cjs. Hence, I tried passing --require=./.pnp.cjs via AVA's nodeArgumentsconfig option, but encountered the same crash as above on the first import.
The .pnp.cjs file contains various maps: one linking package names and versions to their location on the disk and another one linking package names and versions to their list of dependencies. With these lookup tables, Yarn can instantly tell Node where to find any package it needs to access, as long as they are part of the dependency tree, and as long as this file is loaded within your environment (more on that in the next section). ~ Fixing node_modules
The text was updated successfully, but these errors were encountered:
A fix for yarnpkg/berry#3843 was just merged, so anyone following this issue may want to try running AVA on the latest Yarn PnP once it's released.
The fix is available in 4.0.0-rc.22. Run yarn set version canary if you want to try it. v4 release is still a little ways off ("may take a couple more months"), but:
[...] what's in master is stable, and I'd recommend you to try it. The only notable difference with stable is that we reserve the right to land a couple more breaking changes in future RCs, but in terms of stability it's almost always better to use RCs than stable.
I am stumped trying to run AVA on Yarn PnP and wondering how feasible it currently is, whether there may be some insight I missed, or how I might go about adding native support for PnP to AVA. I ran into chalk/chalk#531 and worked around it as described on that thread. That got AVA to load, but it crashes on the first import.
In PnP, most Node.js commands work by running
yarn <command>
, which pretty much just runsnode --require "$(pwd)/.pnp.cjs" <command>
. See the excerpt from Yarn's documentation below for a brief discussion of the purpose of.pnp.cjs
. Hence, I tried passing--require=./.pnp.cjs
via AVA'snodeArguments
config option, but encountered the same crash as above on the first import.The text was updated successfully, but these errors were encountered: