-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Closed
Labels
Awaiting Informationfurther information is requestedfurther information is requestedBugthing that needs fixingthing that needs fixingNeeds Discussionis pending a discussionis pending a discussionRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 releasesemver:patchsemver patch level for changessemver patch level for changes
Milestone
Description
What / Why
For now, we have a problem with the package, which meta info file (where all versions are listed) weights more than 110Mb and it takes 2.5 minutes to download the file on my machine, for our team it causes annoying npm install failed because of
Response timeout while trying to fetch http://regsitry.url/example-meta-file (over 30000ms)
Where
For now, on the local environment, I had to tune npm files, to change the default timeout.
In NPM debug log I found that Response timeout...
message comes from
~/.nvm/versions/node/v12.16.1/lib/node_modules/npm/node_modules/node-fetch-npm/src/body.js:189:16
This one sources: https://github.com/npm/node-fetch-npm/blob/latest/src/body.js#L189
I hardcoded that in such a way:
// allow timeout on slow response body
if (this.timeout) {
resTimeout = setTimeout(() => {
abort = true
reject(new FetchError(`Response timeout while trying to fetch ${this.url} (over ${this.timeout}ms)`, 'body-timeout'))
- }, this.timeout)
+ }, 5 * 60* 1000) // 5 minutes timeout to prevent failing on huge meta files downloading
}
Who
n/a
References
n/a
So the question is:
Is there some parameter/ENV_VARIABLE, that can be passed or be defined before npm install
command, which will override this.timeout
value in the code that I share.
darrinholst, bordi, catarinacepeda, kacian, johnl2323 and 7 more
Metadata
Metadata
Assignees
Labels
Awaiting Informationfurther information is requestedfurther information is requestedBugthing that needs fixingthing that needs fixingNeeds Discussionis pending a discussionis pending a discussionRelease 6.xwork is associated with a specific npm 6 releasework is associated with a specific npm 6 releasesemver:patchsemver patch level for changessemver patch level for changes