錯誤提示如下:
npm install -g @bchatard/alfred-jetbrains
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/@bchatard%2falfred-jetbrains failed, reason: getaddrinfo ENOTFOUND registry.npmjs.org
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 ERR! A complete log of this run can be found in:
npm ERR! /Users/xiangrui/.npm/_logs/2020-01-04T17_28_43_142Z-debug.log
意思就是連接不上 https://registry.npmjs.org,在瀏覽器里訪問這個網(wǎng)址果然訪問不,是用手機訪問 https://registry.npmjs.org 竟然可以訪問,那么試著手機開個熱點,電腦連上手機的網(wǎng)絡(luò)尔邓,npm install -g @bchatard/alfred-jetbrains,成功了锉矢!
記得可以試試瀏覽器請求 https://registry.npmjs.org/