-
Notifications
You must be signed in to change notification settings - Fork 319
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
Analyzing NPM projects fails the DependencyGraphBuilder
with "The following references do not actually refer to packages"
#9699
Comments
DependencyGraphBuilder
with "The following references do not actually refer to packages"DependencyGraphBuilder
with "The following references do not actually refer to packages"
For the record, it seems this regression did not surface before #9616, although it was introduced before that. |
Hello, I can confirm this issue for our project and did a superficial bisect over the tags. For our project at least the analysis produces results up until 39.0.0, but starting with 40.0.0 it aborts with the same error type (different packages) as the opening post. Sadly I am not yet familiar enough with the code base to assist much further at this point. Best regards |
Thank for this analysis!
I started looking into the issue, but got distracted and wasn't able to continue so far. |
DependencyGraphBuilder
with "The following references do not actually refer to packages"DependencyGraphBuilder
with "The following references do not actually refer to packages"
I managed to run full
What I did and what the criterias were for GOOD and BAD:
(a) Closer to v39.0.0, Analyzer writes only a 7kB results file, which is completely missing the dependencies, and logs this issue:
(b) Closer to v45.0.0, Analyzer completely fails to resolve the projects of our monorepo and fails with this error log:
Now this two-fold failure manifestation might have set the bisecting off, but at least it's a start I believe. For info, @fviernau. |
Yeah, it seems there's a couple issues here, the analysis crashes completely from 81f58ea on for the DOS monorepo, and as @Etsija found, the NPM packages aren't found after 03560a5. Now that I found this thread #9551 though, I'm testing to see if recreating the |
So I did some more digging myself, reading the relevant issues and PRs, and here's how to reproduce:
This error field I believe is what #81f58ea catches.
Without knowing the details of parsing the Judging from the data class |
@fviernau with the recent findings, any ideas to why the Analyzer fails? Any chance the parsing of |
I have not experimented with this yet, but google it for a while. Some search results indicate So after reading [2], looking again at your output it seems that (I would have liked to copy an paste stuff, but you accidentally attached an image), [1] https://stackoverflow.com/questions/71152952/what-does-npm-err-code-elsproblems-mean |
In your lockfile the install locations seem to be:
For any X dependency of a dependency Y, if X is not installed in any subdir of Y, then the installed package is search for in ancestor dir. So for package
I now wonder whether this is caused by
Sp, probably it was installed with |
(Somehow I was accidentally mislead into looking into
See also ort/plugins/package-managers/node/src/main/kotlin/npm/Npm.kt Lines 164 to 168 in d7cb050
edit: Hm, well legacy peer deps is not used by default |
@sschuberth I just found that the project uses workspaces [1]. The module info for the failing package is:
In this case the IMO |
That's likely true, though analysis at least seemed to work before, not saying that the results were correct.
Sounds reasonable. When I briefly started to debug the issue before my vacation, I toyed with changing the condition at ort/plugins/package-managers/node/src/main/kotlin/npm/NpmDependencyHandler.kt Lines 59 to 60 in 16558a3
to
which got me a bit further, but then I had to stop looking into the issue. |
I hope that the code which needs to be added for supporting workspaces will be similar (relatively simple) to the one in |
Running NPM analysis on https://github.com/doubleopen-project/dos fails with
This used to work before and was probably broken by the NPM packager manager rewrite.
The text was updated successfully, but these errors were encountered: