syncpack icon indicating copy to clipboard operation
syncpack copied to clipboard

TypeError: (0 , minimatch_1.minimatch) is not a function

Open donhcd opened this issue 1 year ago • 0 comments

Description

yarn run syncpack list-mismatches and other commands all fail due to TypeError: (0 , minimatch_1.minimatch) is not a function image

When I look at the code referenced by this, at node_modules/syncpack/dist/guards/can-add-to-group.js, I see this: image

~I don't understand why this code is in the package -- is (0, minimatch_1.minimatch) ever expected to be callable? Is there something I'm doing wrong here that is causing me to end up in this bad code path?~ it seems like the comma operator essentially means that the parenthesized expression evaluates to the value of the last expression in the set of commas, so the comma thing is actually fine, but the code is broken because it should be referencing the capital minimatch_1.Minimatch. If I update the two cases of minimatch_1.minimatch it to instead be minimatch_1.Minimatch, I no longer get this error

Suggested Solution

change minimatch_1.minimatch to minimatch_1.Minimatch?

Help Needed

donhcd avatar Feb 16 '24 21:02 donhcd