vue2.5 node安裝教程

vue2.5 node採坑

下載laravel後

安裝nodejs

nodejs版本不能太高,我這裡2.5用的是node-v6.7.0-x64

如果版本太高,執行npm install的時候會有報錯說版本超出

裝好nodejs -v6.7後。

換源:

npm config set registry https://registry.npm.taobao.org

安裝淘寶鏡像

npm install -g cnpm --registry=https://registry.npm.taobao.org

如果報錯:

System Windows_NT 6.2.9200

If you are behind a proxy, please make sure that the 'proxy' config is set properly. See: 'npm help config'

檢查環境變量有沒有http_proxy。有的話把:http_proxy:120.0.0.1刪除(另外這行命令也可以嘗試:npm config set https-proxy null)

關閉cmd窗口後重新打開

執行npm install -g cnpm --registry=https://registry.npm.taobao.org --安裝cnmp

vue2.5 node安裝教程

vue2.5 node安裝教程

上面這個圖安裝成功後,執行cnpm install。成功後就是下面的圖。

vue2.5 node安裝教程

安裝的注意的點就是注意版本對應,這很重要。


分享到:


相關文章: