Skip to content

tns create command not using proxy set with tns proxy set #3824

@enyineer

Description

@enyineer

Did you verify this is a real problem by searching the NativeScript Forum and the other open issues in this repo?

Yes

Tell us about the problem

Pacote fetch does not use the proxy that has been set via tns proxy set

Which platform(s) does your issue occur on?

Windows 10 Enterprise 2016 LTSB

Please provide the following version numbers that your issue occurs with:

  • CLI: 4.2.1
  • Cross-platform modules: Not related to issue
  • Runtime(s): Not related to issue
  • Plugin(s): Not related to issue

Please tell us how to recreate the issue in as much detail as possible.

  1. Set a proxy via tns proxy set
  2. Create a console log or debug the script in "%USERPROFILE%\AppData\Roaming\npm\node_modules\nativescript\node_modules\pacote\lib\fetchers\registry\fetch.js" at line 13 to look into the "opts" variable. It does not contain the proxy options that have been set before.
  3. This results in a fetch that does not use the proxy thus leading to a timeout if you are behind a proxy.
  4. It can be fixed temporarily by setting "opts.noProxy = false" and "opts.proxy = PROXY_URL".

It would be nice if the cli could set these properties correct so the user doesn't have to manually code the PROXY_URL into the dependency.

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

There is no own code involved.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions