-
Notifications
You must be signed in to change notification settings - Fork 144
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
Cannot import npm specifier modules due to firewall #837
Comments
I reach a similar wall. Config: vscode: Behind a corp proxy I can use deno CLI with specific env variables:
But vscode deno extension does not seem aware of proxy env variables. As a result remote links appear underlined in red wiggle and "Uncached or missing remote URL" on hover e.g.: NOTE: Here they look ok as I write from outside corp env An unfortunate consequence for dev exp is that all objects from these outside links are considered On the other hand the certificate config can be set in {
"deno.enable": true,
"deno.cache": ".cache",
"deno.tlsCertificate": "/path/to/corp/ca-certificates.crt",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
} A surprising fact is that even if vscode proxy settings are explicitly set (in field below) this does not help vscode deno extension - as opposed to other extensions of vscode. This limitation is a serious drag for deno use in a corp env I'm afraid. |
@oscar6echo I've checked that |
@justinmchase Is it acceptable to set |
I'm pretty sure I do have it set that way but will check again and yeah it would be ok to pick it up that way in my case, since it's a machine global. But I could see someone still wanting a per repo setting. |
What do you call user's env ? Do you mean the terminal from which to start VS Code ? If so, it may not apply in my case as I use VS Code remote SSH to connect to a machine. The doc warns about it, if I understand well. This is why I explicitly tried the Suggestion: the vscode_deno extension could read env vars from an env file passed in deno settings say (or similar): {
"deno.proxyEnvFile": "path/to/env/file.env"
} This optional setting would override the current behavior - and be pleasantly explicit and easy to understand, |
@oscar6echo Version 3.38.0 of the extension has been released. You can now have settings like: {
"deno.envFile": "path/to/env/file.env"
} {
"deno.env": {
"HTTP_PROXY": "http://localhost:8080"
}
} @justinmchase Please try this with |
@nayeemrmn thx for the super fast release ! 👏 Much appreciated ! |
@nayeemrmn It does work fine (unsurprisingly) and this is really pleasant. Thx again ! |
Great to hear that @oscar6echo, I'll close this issue for now. Let me know if you face any other problems. |
Describe the bug
I cannot configure
NPM_CONFIG_REGISTRY
in the vscode extension.https://deno.com/blog/v1.29#custom-registry-support-via-environment-variable
To Reproduce
Expected behavior
I expect to be able to have this succeed by importing through the proxy.
I would imagine it could be as simple as adding an option
npmRegistry
to the settings which would set that env variable before invoking deno.Screenshots
Versions
vscode:
1.67.2
deno:1.32.4
extension:v3.17.0
The text was updated successfully, but these errors were encountered: