You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I gave a try to npm-consider today in my company environment.
We use Nexus from Sonatype as a private registry that mirrors npm's one and his hosting company's private modules.
For some reason (which might be a misconfiguration of the Nexus instance on our side), npm-consider can't fetch the package's dependencies size (everything is at 0).
When selecting Impact from the prompt, it gives me the following output:
? What is next? Impact
Packages 5 +4.31%
Size 0 B +NaN%
After a quick read of the codebase, I can see that this is the line causing it to be NaN (divide by 0):
Do you think a PR that adds a check on currentPackageStats.size and setting everything to 0 or (option b) adding a message saying that something wrong happened while trying to fetch package size is appropriate ?
I am willing to work on this, just need your opinion before.
Regards
The text was updated successfully, but these errors were encountered:
anchnk
changed the title
Private registry might returns NaN in Impact's Size percentage
Private registries might returns NaN in Impact's Size percentage
Jul 30, 2018
if your instance is not supporting HTTP HEAD it's a problem; the tools relies on HTTP HEAD; is it possible for you to enable HEAD on your Nexus server?
if you can add proper error reporting for this case, please do; NaN definitely does not looks good
I gave a try to
npm-consider
today in my company environment.We use Nexus from Sonatype as a private registry that mirrors npm's one and his hosting company's private modules.
For some reason (which might be a misconfiguration of the Nexus instance on our side),
npm-consider
can't fetch the package's dependencies size (everything is at 0).When selecting
Impact
from the prompt, it gives me the following output:After a quick read of the codebase, I can see that this is the line causing it to be
NaN
(divide by 0):https://github.com/delfrrr/npm-consider/blob/master/lib/showImpact.js#L102
Do you think a PR that adds a check on
currentPackageStats.size
and setting everything to 0 or (option b) adding a message saying that something wrong happened while trying to fetch package size is appropriate ?I am willing to work on this, just need your opinion before.
Regards
The text was updated successfully, but these errors were encountered: