-
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] GitHub references to dependencies slow/hang #4896
Comments
Seems similar to #4895, but for swapped npm versions. Maybe something on GitHub’s side? |
This is happening to everyone at our company -- Mac, Windows, inside GitHub Actions runners -- everywhere. (I don't think it's a Mac-specific issue). |
Definitely seeing this issue, starting Friday May 13th sometime early to mid-afternoon Eastern time Here's what I see now. Installing with
and with Note: this isn't even installing from scratch, just running the same npm install with a different protocol
Importantly, this is with an older version... nodejs 12.22.12 / npm 6.14.16 When I try the most recent node... 16.15.0 with npm 8.5.5, I see no difference in time |
If you run npm with
This also runs slow on the command line. But replacing it with:
or
Are both fast. So it's trying to use the git protocol, which is odd. It's not supported by GitHub anymore: https://github.blog/2021-09-01-improving-git-protocol-security-github/ |
Even more disturbing, if you change the dependency to explicitly use ssh: e.g. It still times out attempting to get it over git protocol! e.g.: |
I have a solution that works for me: Run This appears to configure it to use ssh instead of the git protocol which no longer works. |
Experiencing this issue also with Node 14.19.0 & npm 6.14.17. Before experimenting with the workarounds, would be awesome to resolve why this started just this suddenly 🤷 ... |
We experienced the same slowness on 6.14.11, we found out that updating npm to version 7.16.0 (at least, that was our go to version for other reasons) solved the issue., although it's not clear the root cause. |
Similar issues happening to our repos with github packages. node: 16.13.0 We started experiencing slowness since yesterday. *** Solved it by removing a package named: And updating |
…l from github The switch to node v16 gets use npm v8, to workaround an issue with slow 'npm install <any github repo dependency>'. See: npm/cli#4896 In our case the github repo dependency was the command given to docker run this container: bash -c "npm install elastic-apm-node#SOME-COMMIT-SHA && node app.js" This also adds a package.json to more explicitly declare we are working with a node project workspace. Also avoid generating a package-lock file we won't use. Fixes: #1483
…ue with github deps [email protected] (and only that version) has a github dep: "@types/mysql": "types/mysql", Attempting to install that version with npm v6 (the npm in node v10, v12, and v14) hits npm/cli#4896 which results in an install so slow that is hits the default 2 minute 'npm install' timeout in the `tav` tool.
…l from github (#1484) The switch to node v16 gets use npm v8, to workaround an issue with slow 'npm install <any github repo dependency>'. See: npm/cli#4896 In our case the github repo dependency was the command given to docker run this container: bash -c "npm install elastic-apm-node#SOME-COMMIT-SHA && node app.js" This also adds a package.json to more explicitly declare we are working with a node project workspace. Also avoid generating a package-lock file we won't use. Fixes: #1483
…ue with github deps (#2696) [email protected] (and only that version) has a github dep: "@types/mysql": "types/mysql", Attempting to install that version with npm v6 (the npm in node v10, v12, and v14) hits npm/cli#4896 which results in an install so slow that is hits the default 2 minute 'npm install' timeout in the `tav` tool.
node: v11.13.0 Our Solved by replacing github protocol with https
|
Here is what fixed the issue for me in AWS EC2 / ElasticBeanstalk deployment of a Node.js app: Run a command in commands:
01-configure-git:
command: sudo git config --system url."https://github".insteadOf "git://github"
ignoreErrors: true # optionally, so deployment doesn't fail in case the command fails for some reason Only checking your own |
To go along with @mtrezza 's comment. If you need to address this in Travis CI, you can add it to the
|
The root cause of the issue is that github disabled the It'd be awesome to release a fix for the NPM v6 series 🙏 . |
Every npm version that is still under LTS should actually receive a fix for this. It became a bug to use the |
Does this mean that despite the deprecation schedule mentioned in that post, they didn't actually remove support until this past Friday May 13th? |
That's my interpretation of what happened, yeah. Maybe GitHub figured it was better to do something like that on a Friday the 13th? |
…ue with github deps (#2696) [email protected] (and only that version) has a github dep: "@types/mysql": "types/mysql", Attempting to install that version with npm v6 (the npm in node v10, v12, and v14) hits npm/cli#4896 which results in an install so slow that is hits the default 2 minute 'npm install' timeout in the `tav` tool.
I patched pacote in node-v14.17.6 like this:
This completely solved the problem for github shortcuts. |
fixed by replacing npm with yarn |
I am facing this issue and the solution is change package which need to be downloaded by npm from Github repo like this: |
any word on whether a fix will be backporteed to npm 6? given LTS for node 14 |
Thank men, this worked for me inside of docker:
|
Reasons to bump: 1. Both downstream repos use Node.js 16 now. 2. NPM 6 (bundled with Node.js 14) is slow to install Auspice from a GitHub commit reference. Later versions of NPM should fix this¹. ¹ npm/cli#4896
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
As of approximately 10AM EST today, installing using a GitHub reference on NPM 6 became slow to the point where it often simply hangs. This was not the case previously, and works on NPM 7/8.
Unfortunately there are other performance issues with the v2 lock file format also related to using GitHub references that are currently preventing an upgrade to NPM > 6.
Expected Behavior
Installing a dependency using a GitHub reference should be possible.
Steps To Reproduce
npm install github:Brightspace/d2l-fetch
ornpm install Brightspace/d2l-fetch
Interestingly,
npm i git+https://github.com/Brightspace/d2l-fetch.git#semver:^2
installs in 0.7 seconds.Environment
The text was updated successfully, but these errors were encountered: