Skip to content
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

Startup takes 3mins, NO_UPDATE_NOTIFIER #551

Closed
AriPerkkio opened this issue Dec 20, 2019 · 2 comments
Closed

Startup takes 3mins, NO_UPDATE_NOTIFIER #551

AriPerkkio opened this issue Dec 20, 2019 · 2 comments

Comments

@AriPerkkio
Copy link

First of all, thanks for the great extension!

Starting the extensions takes 3 minutes when running it on environment behind proxy. This issue is was recently seen on prettier extension as well, and was fixed for 3.17.0. prettier/prettier-vscode#1143

[Info  - 8.31.40] ESLint server stopped.
[Info  - 8.31.41] ESLint server running in node v12.4.0
[Info  - 8.31.41] ESLint server is running.
Uncaught exception received.
Error: spawn C:\Users\xx\AppData\Local\Programs\Microsoft VS Code\Code.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:9)
[Info  - 8.34.52] ESLint library loaded from: C:\Users\xx\<path-to-projecta-root>\node_modules\eslint\lib\api.js

Time between the last two timestamps is ~3min.

This eslint plugin is using the same methods to run npm on child_process:
https://github.com/microsoft/vscode-eslint/blob/master/server/src/eslintServer.ts#L511
https://github.com/microsoft/vscode-languageserver-node/blob/master/server/src/files.ts#L140

let stdout = spawnSync(npmCommand, ['config', 'get', 'prefix'], options).stdout;

The issue can be fixed by setting environment variable NO_UPDATE_NOTIFIER to true.
prettier/prettier-vscode#1143 (comment)

I'd like to see this fixed on the extension itself rather than set up these env variables on all our developer machines.

@dbaeumer
Copy link
Member

@AriPerkkio thanks a lot for the pointer. To be clear. I need to set the env to the string value 'true'

@dbaeumer dbaeumer transferred this issue from microsoft/vscode-eslint Dec 20, 2019
@AriPerkkio
Copy link
Author

Yes, that should do it. The fix looks OK.
Thanks for taking action quickly!

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants