-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npm outdated fails with an error, does not say _where_ the issue lies. #1703
Comments
Hi @andreieftimie let me know in case there's a public repo in which we can easily reproduce the problem 😊 |
This commit fixes a problem in which npm outdated was breaking when trying to read an invalid semver range spec defined for a given installed dep by performing the `npm-package-arg` parsing within a try/catch block instead of expecting to read properties from the returned instance. Also, adds the missing test for that specific line of code. Fixes npm#1703
This commit fixes a problem in which npm outdated was breaking when trying to read an invalid semver range spec defined for a given installed dep by performing the `npm-package-arg` parsing within a try/catch block instead of expecting to read properties from the returned instance. Also, adds the missing test for that specific line of code. Fixes npm#1703
This commit fixes a problem in which npm outdated was breaking when trying to read an invalid semver range spec defined for a given installed dep by performing the `npm-package-arg` parsing within a try/catch block instead of expecting to read properties from the returned instance. Also, adds the missing test for that specific line of code. Fixes #1703 PR-URL: #1857 Credit: @ruyadorno Close: #1857 Reviewed-by: @nlf
This commit fixes a problem in which npm outdated was breaking when trying to read an invalid semver range spec defined for a given installed dep by performing the `npm-package-arg` parsing within a try/catch block instead of expecting to read properties from the returned instance. Also, adds the missing test for that specific line of code. Fixes #1703 PR-URL: #1857 Credit: @ruyadorno Close: #1857 Reviewed-by: @nlf
hi @andreieftimie thanks for the report! 😄 This should be fixed in Let us know in case there are still problems 😊 Thanks again! |
@ruyadorno thanks. I can confirm |
On WSL2 - Ubuntu 20.04 using nvm and having installed v15.2.1 and today v15.3.0 i receive the same bug for both of those versions. Switched back to v14.15.1 and the problem is gone. npm version was 7.0.14. Now is 6.14.8 |
I'm getting this error today on Windows 10, npm |
@jamessouth try npm v7.3.0? |
...but not anymore, |
The error displayed is:
|
Try v7.4.0? |
For me the dependency that causes the error is
which I need to use tailwindcss with PostCSS 7, see https://tailwindcss.com/docs/installation#post-css-7-compatibility-build So the workaround for me is to delete that line, run |
Same issue as @erichoswald, thanks for the tip! :) |
Same issue with NPM v7.6.0. // package.json
{
// ...
"devDependencies": {
// ...
"package-alias": "npm:actual-package-name@^0.0.5",
// ...
}
} I tried to replicate this by creating a sample project, but could not. Perhaps it happens if there are multiple dependencies and one of them is aliased AND outdated. |
Thanks @erichoswald @pastelmind, that's a different problem, I opened #2800 to track and fix it. |
Thank you @erichoswald #2800 (comment) |
@erichoswald Thanks for the hint! For me it was this line: "gsap": "npm:@gsap/shockingly@^3.10.4", Removed it, ran |
Current Behavior:
The complete log:
Expected Behavior:
It should not fail. If there are non-conform package versions in the tree those should be noted and an output should still be presented. This should not be an all-or-nothing operation
If it fails, it should point the user in the direction of the failure, so that he may address the issue.
In my case I do have a fairly complex dependency tree. Yet I have to go one by one through all deps, from all packages to figure out where this error comes from.
Steps To Reproduce:
No specific steps at this time. I might try to get a minimal reproducible testcase.
Environment:
The text was updated successfully, but these errors were encountered: