Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"

I just started to install NativeScript on Windows 10 with this command:

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"

that I got from installation guide here https://docs.nativescript.org/angular/start/quick-setup

But I get this error message:

Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://www.nativescr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException


C:\Windows\system32>@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
Exception calling "DownloadString" with "1" argument(s): "Unable to connect to the remote server"
At line:1 char:1
+ iex ((new-object net.webclient).DownloadString('https://www.nativescr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

What is the problem and how can I fix?

like image 739
user3486308 Avatar asked Nov 30 '25 00:11

user3486308


1 Answers

The following steps worked for me:

  1. Download the file from the URL (https://www.nativescript.org/setup/win).
  2. Run cmd as administrator and cd to the directory where you downloaded the file.
  3. In cmd execute the following: powershell -noexit "& ""./native-script.ps1"""
like image 186
Eran Avatar answered Dec 01 '25 14:12

Eran