Open roarbr opened 3 years ago
Have you looked into (e.g. with Wireshark or Fiddler) what the npm client does when downloading caret and tilde versions?
I would suggest you base your downloads on the package-lock.json
instead of the package.json
file.
Hi, While using npm-leech to download a package with a lot of dependencies, some dependencies failed to download with an error message like this:
The package.json used with npm-leech version 1.2.1:
The package 'express' dependencies, only showing the two first:
The dependency 'array-flatten' has a "normal" semver and is downloaded without problems. But the dependency 'accepts' has a tihlde in the semver. This causes npm-leech to download this version without resolving the tihlde to a "normal" semver first. But the registry does not understand "GET http://registry.npmjs.org/accepts/~1.3.7".
Using wireshark, this is the TCP stream when downloading the package 'accepts':
So, shouldn't npm-leech resolve tihlde and caret semvers into normal semvers before downloading packages?