-
Notifications
You must be signed in to change notification settings - Fork 1.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
npm install fails behind corporate proxy #319
Comments
I just published version 0.6.18, which will fall back to |
@evanw I'm getting the same problem on esbuild 0.12.20 It failed to run the following and fell back to try to download the binary from npm directly.
But if I remove the prefer offline flag, it works fine. When I check the npm cache log, it contains
I'm assuming my cache doesn't have the latest version, and so prefer offline doesn't really work. Then once I've downloaded it once without the prefer offline flag. The package info is now cached and I have npm 7.6.0 Would removing |
Just curious: Are you able to install Context: The |
@evanw Hmm... I'm not sure I can verify quickly. This installation problem only happens if I have cache before a new version of esbuild is released, then it wouldn't be able to find the new version in the local cached manifest and fail. Installation always works for the initial installation, or if I clear my npm cache. To elaborate, because I have installed 0.12.19 previously, I believe the manifest listing all versions until 0.12.19 is available locally. And when 0.12.20 is released, I can install any version below 0.12.20. But installing [email protected] with prefer offline flag would result in the above error. Installing [email protected] without the flag is fine. So far, I've only been able to verify this theory with the .19 and .20 release. But I am able to install |
Hello, I have the same issue as @danvim, being behind corp proxy, but while generating angular 12 library where esbuild is probably dependency of ng-packagr, since that is the only package installed while generating new library.
I am able to install package separately using npm install, so this is probably not the issue with proxy itself. |
I suspect these issues may have been introduced by #551, which landed in version 0.8.12 on November 21, 2020. That PR changed the nested This change was done to fix issues on Windows since deleting a directory on Windows is randomly sometimes impossible, and leaving a nested If my hypothesis is correct, that would mean that installing In any case, it sounds like I should re-open this issue. |
@evanw I believe in my case, I can install any version as long as they are already in the manifest I've cached locally. If you were to release a newer version tomorrow, I wouldn't be able to install that unless I clear my local cache to remove my local manifest for esbuild-windows-64. |
I'm running into an issue upgrading, with self signed cert exception, while upgrading from Manually executing the step and removing the Not sure if this is the same problem, but I'm also behind a corporate proxy, so seemed to be the best fit I could find.
|
So my computer apparently also fails with create react app with a similar issue. facebook/create-react-app#8294 It also worked when I removed the |
It seems this issue with ETARGET is not completely fixed, but I can't provice reliable reproduction but here's part of a failing log:
Running the failing |
After upgrading from 0.6.3 to 0.6.17 the install process of npm fails in post install step.
It turned out to be a proxy issue:
The reason is that the fetch routine does direct http(s) connections.
https://github.com/evanw/esbuild/blob/master/lib/install.ts#L123
If there would be some way to use npm to download the dependencies that would be great.
Else you should provide a way to respect http_proxy and https_proxy env variables.
Right now I have to find a Windows machine that can do direct downloads and copy the files afterward.
The text was updated successfully, but these errors were encountered: