Open Gisleburt opened 3 years ago
I am fairly confident that this package will not work with yarn pnp. They do some extensive overriding of node internals and this package uses some dynamic imports which IIRC will break. I don't use yarn
and especially not with pnp, but if you can find a fix which is backward compatible I am happy to take a PR.
@Gisleburt I experienced a similar issue after switching to Yarn berry v3.3.1 with "Zero Installs" and resolved it by unplugging the migrate
package like so:
> yarn unplug migrate
This will unpack the cached zip archive of the migrate
package under the .yarn/unplugged/
folder. This will also reference the migrate
package in the package.json under dependenciesMeta
so that yarn treats this package as unplugged during the future installs. This means the package will be unpacked for everyone doing yarn install
. The good news is the package archive will still be cached under .yarn/cache
(i.e. checked into git repo) so it won't download it.
Here is more info from yarn docs: https://yarnpkg.com/cli/unplug
Hope it helps anyone using this package.
I've added migrate to my package json so that it always passes in the correct store, complier and template options¹
If I try to use it directly, eg:
When I run it with yarn 2 I get the following error
I have a work around by prefixing migrate with
npx
which then installs and runs a global version of migrate.We're using yarn 2 with pnp, however other binaries run ok. Did I miss something?
¹ Is there a runtime configuration (rc) file that I missed or isn't not documented so that I don't have to do this?