-
Notifications
You must be signed in to change notification settings - Fork 108
Print full URL in error message when it fails to load a module #144
Comments
Issue the PR! This error is killing me! |
Running across this same issue. |
Anyone with admin access to this repro willing to approve a PR? |
(@iarna?) |
So the error message is basically assuming that a certain part of the URL is the package name? Why not report the error with the package name that was used to construct the URL returning the 404, and leave the full URL as debug output? I don't really care what the full URL was on my first pass , I know what my configured registry URL is and I just want to know what dependency it couldn't find. |
+1 This is causing issues for me as well, renders our npm artifactory mirror unusable. |
Sorry I haven't responded to this one: this is fixed in Parsing out the URL like this is super janky and just generally bound to be a pain. I'd rather do it "right" and pass in specifier information (which is what That's all in npm/npm#15666 |
Awesome, thank you so much @zkat!! |
@warandpeace see https://github.com/zkat/pacote/blob/latest/lib/fetchers/registry/fetch.js#L41-L44 for the code that does the magic |
This is related to: npm/npm#11834
If you use artifactory for your npm registry then npm prints a rather confusing error message when it fails to load a module:
The 'artifactory' name is incorrectly extracted at https://github.com/npm/npm-registry-client/blob/master/lib/request.js#L276.
This has been consistently confusing devs on our team, and makes to tricky to hunt down the offending node module.
Would you accept a PR that adds a line to the error message with the full URL? For example the above error message would now become:
The text was updated successfully, but these errors were encountered: