npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/@babel%2fparser failed, reason: connect ETIMEDOUT 104.16.20.35:443
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/@babel%2fplugin-syntax-export-namespace-from failed, reason: connect ETIMEDOUT 104.16.20.35:443
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
上面是錯誤信息,然后我也是百度了一下,
第一種情況:可以先執行npm config set proxy null ,然后在執行npm install
第二種情況:可以安裝淘寶鏡像,通過鏡像安裝依賴,npm install -g cnpm 然后 cnpm install
本人試了以上兩種方法都未成功,看了一些帖子上說的出現這種情況的主要原因,最主要就是網絡差的原因,然后我用自己手機的熱點一次性成功了,如果你也遇到這種情況換一個網速好的網試試應該就可以了!