2016-08-12 257 views
0

我想安装nativescript,我是新手,所以我会很感激任何帮助。 首先,我正确安装了它,但在此之后,我在nativescript网站上看​​到了一页用于高级安装的,所以我用它打得四处..现在我不能运行命令TNS和无法卸载,不能老是安装.. 这里是错误,我得到:安装nativescript时出现npm错误

first pic

second pic

记:我也更新了我的nodejs到最新版本,但c ouldnt更新NPM,当我试图运行:NPM安装NPM -g我得到了这样的错误在这里:

npm errors

我也尝试重新启动电脑,但didn`t帮助。

我卸载节点,NPM然后重新安装它们..现在我得到这个错误:

   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

你试图卸载第一个屏幕lnativescript ...在你运行的最后一个屏幕错误的命令 - 你应该运行:npm install -g nativescript(而不是npm install npm) –

回答

0

这是一个连接问题。

记得thatI与代理服务器配置起到错误是这样的:

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

这使故宫客户端尝试打本地主机:8080抠模块,而不是正确的互联网端点。

所以夫妇无奈的日子后,我访问过的链接

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

然后运行

npm config edit 

其打开的文件该文件我删除了这些三行我上面添加里面,然后一切正常。