Skip to content
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

TypeError if using workspaces + yarn2 + PnP and nested targets #13

Open
v1adko opened this issue Sep 14, 2021 · 0 comments
Open

TypeError if using workspaces + yarn2 + PnP and nested targets #13

v1adko opened this issue Sep 14, 2021 · 0 comments

Comments

@v1adko
Copy link

v1adko commented Sep 14, 2021

More of a discussion to make this issue searchable.
I don't think that the code fix is needed since it can be fixed with a configuration change.
The issue is most likely due to del upgrade in v2 and yarn PnP being an edge case that adds to the complexity

The error is this:

[!] (plugin delete) TypeError: Cannot destructure property 'withFileTypes' of '(intermediate value)(intermediate value)(intermediate value)' as it is null.
TypeError: Cannot destructure property 'withFileTypes' of '(intermediate value)(intermediate value)(intermediate value)' as it is null.
    at PosixFS.readdirPromise

TLDR Solution if you have nested folder structure in your targets:
Change the targets to ["dist/**/*", "dist/*"] (note the order)

Reproduction repository with more background info

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant