使用vue-cli創(chuàng)建項(xiàng)目后属桦,npm init常出現(xiàn)以下問(wèn)題:PhantomJS not found on PATH
這是因?yàn)槲募hantomjs-2.1.1-windows.zip過(guò)大羊精,網(wǎng)絡(luò)不好容易下載失敗炒考。
方法一:
可以使用cnpm安裝,這樣速度會(huì)快一些
cnpm的安裝方法:
npm install -g cnpm --registry=https://registry.npm.taobao.org
方法二:
這里這個(gè)url是錯(cuò)誤的胁出,所以我們可以人工下載這個(gè)壓縮包,并放到相應(yīng)目錄下拒名,然后在執(zhí)行npm install重新安裝即可這里要注意版本中燥!
原文地址:https://segmentfault.com/a/1190000008996214