-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Unable to resolve aliased dependency from nested directory #361
Comments
I'll take a look ASAP |
Ok, I discovered the problem:
Therefore, replace I'm not sure if @JounQin wants to support the strange behavior in which we must check if each entry in |
Ah, that's an artifact of me trying to get a minimal reproduction. However it also seems to fail with:
|
But you are correct that it works using |
I think See https://github.com/mrmlnc/fast-glob?tab=readme-ov-file#synchronous |
Unfortunately, I've discovered the issue... it's something related to |
@JounQin I can confirm that if a pattern is not dynamic (i.e. a real path to a file) and ignore contains |
@carlocorradini edit: didn't notice this was a different issue, my bad |
@SuperchupuDev AFAIK they are separated:
|
okay! although this issue is very odd to me. not just that i can't locally reproduce it myself (by doing the following) await glob(['/home/meow/code/fdir/src/*'], {
debug: true,
ignore: ['node_modules/**', '../../test'],
expandDirectories: false
}) it's also that afaik the code that handles |
Try removing |
@SuperchupuDev The steps to reproduce are in the first comment of this issue 👍 |
nevermind i just managed to locally repro it
no need, issue happens regardless |
@SuperchupuDev Awesome |
i think i got a fix! can y'all try to see if it's still an issue with this preview release by adding the following to your "resolutions": {
"tinyglobby": "https://pkg.pr.new/tinyglobby@d5fb84c"
}, |
@SuperchupuDev What was the issue? |
@carlocorradini 0.2.11 introduced some more matching when crawling to avoid crawling more directories than needed. however by using |
@SuperchupuDev Thanks 👍 |
Using that preview release fixes the issue for me! I tried it both on the reproduction repository and on my actual projects: All my imports resolve again now :) By the way, the npm equivalent of "overrides": {
"tinyglobby": "https://pkg.pr.new/tinyglobby@d5fb84c"
} |
@ehoogeveen-medweb Awesome thanks for trying it before me :) |
probably! will test some more to make sure no other inputs can cause it, look into the |
0.2.12 has been released with the fix 👍 |
|
As of v3.8.0 some of my imports aren't resolving. It still happens as of v3.8.2 and doesn't seem like it's related to #359 as there are no dot directories involved.
Instead, a crucial component seems to be that the file attempting to resolve the aliased dependency must be nested a few levels deep. I'm not sure exactly what the conditions are, but I created a reproduction repo showing that it works with less nesting, but not with more.
Reproduction repo: https://github.com/ehoogeveen-medweb/unresolved-repro
To reproduce:
npm ci
npx eslint .
Expected result:
No errors, as with version v3.7.0.
Actual result:
src/working.ts
gives no errorssrc/nested/broken.ts
gives errorUnable to resolve path to module 'ext/ua-parser.js'
The text was updated successfully, but these errors were encountered: