2016-08-12 200 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 

其打開的文件該文件我刪除了這些三行我上面添加里面,然後一切正常。