0
votes

i am trying to install nativescript, i am new to it so i'll appreciate any help.. first , i installed it correctly but after that i saw a page on nativescript site for advanced installation, so i played around with it .. now i cannot run the command tns and cannot uninstall, can`t install.. here is the errors i get:

first pic

second pic

note: I also updated my nodejs to the newest version , but couldnt update npm , when i tried to run: npm install npm -g i got errors like here:

npm errors

i also tried rebooting the pc but didn`t help.

i uninstalled node, npm then installed them again .. now i get this error :

             ERR! network getaddrinfo ENOTFOUND registry.npmjs.org      registry.npmjs.org:443
         ERR! network This is most likely not a problem with npm itself
         ERR! network and is related to network connectivity.
         ERR! network In most cases you are behind a proxy or have bad network settings.
         ERR! network
         ERR! network If you are behind a proxy, please make sure that the
         ERR! network 'proxy' config is set properly.  See: 'npm help config'

         ERR! Please include the following file with any support request:
         ERR!     C:\Users\Home\npm-debug.log
1
on the first screen you are trying to uninstall lnativescript... on the last screen you are running wrong command - you should run: npm install -g nativescript (instead of npm install npm) - Nick Iliev

1 Answers

0
votes

It was a connection problem.

I remember thatI played with proxy configuration by mistake like this :

   npm config set proxy http://localhost:8080/
   npm config set https-proxy http://localhost:8080/
   npm config set strict-ssl false

which made npm client attempts to hit localhost:8080 to pull the module rather than the correct internet endpoint.

so after couple of days of frustration i visited this link

https://docs.npmjs.com/cli/config

then run

npm config edit

which opened a file inside that file i removed those three lines i added above , then everything worked fine.