-
Notifications
You must be signed in to change notification settings - Fork 19
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
Running 'jay' hangs for ~3 minutes when running behind network proxy on Windows #20
Comments
can't reproduce this myself unfortunately - does installing modules via jay work for you when behind the proxy? $ jay
> require('lodash') |
I am not surprised that you cannot reproduce this :) Interestingly, after changing absolutely nothing I thought I could require modules. I had installed
But maybe I had been off my network proxy when I loaded lodash the first time. Now I cannot load any packages:
FYI, my |
I figured out the cause of the error I was getting when attempting to require un-cached packages. It turns out that
After fixing that I am now back to being able to require packages. And I can still run |
|
Simply running
jay
from the console on Windows hangs for about 3 minutes before eventually displaying the node, npm, and jay-repl versions (and prompt). This only happens when behind a network proxy. I've done some investigation and the code that causes this to hang is the following line incli.ts
.version('npm', execa.sync('npm', ['-v']).stdout)
It appears that this is caused by a "bug" in npm. Apparently, version 4.4.0 of npm added an update check feature. When running npm commands via
child_process
the network proxy is not observed and thus a network timeout occurs after 3 minutes.A workaround for this is to set the
NO_UPDATE_NOTIFIER
environment variable to false. I tested the following code that resolves this issue:Could you fix this? I tried cloning the repo to do a pull request but I am getting errors doing that too (which also appear to be network proxy related!).
node v10.13.0
npm v6.4.1
jay-repl v0.2.2
Thanks,
Jonathan
The text was updated successfully, but these errors were encountered: