配置環境時,npm install一直遇到同一個錯誤:

檢查了下log,發現npm在獲取patternfly依賴包元數據的時候總是會遭遇不可預料的文件末端
1486 silly fetchPackageMetaData error for patternfly@>=3.27.2 unexpected end of file 1487 silly pacote git manifest for components-jqueryui@github:components/jqueryui#1.12.1 fetched in 825ms 1488 silly resolveWithNewModule components-jqueryui@1.12.1 checking installable status 1489 verbose stack Error: unexpected end of file 1489 verbose stack at Gunzip.zlibOnError (zlib.js:152:15)
稍微搜索了一下相關問題,提到可能是網絡不穩定的原因,開着VPN重試,還是不行。看到一種思路是更換國內鏡像,試了一下,搞定了。
npm config set registry https://registry.npm.taobao.org
參考資料在這里,鑒於評論中提到的一些情況沒有配置成默認的數據源,印象中還有cnpm之類的操作,待續。
.
