本文共 1482 字,大约阅读时间需要 4 分钟。
npm安装hexo报错:
npm get registry
,npm config set registry https://registry.npmjs.org/
,C:\Users\zhang>npm install -g hexo-clinpm ERR! code ENOTFOUNDnpm ERR! errno ENOTFOUNDnpm ERR! network request to https://registry.npm.taobap.org/hexo-cli failed, reason: getaddrinfo ENOTFOUND registry.npm.taobap.org registry.npm.taobap.org:443npm 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! networknpm ERR! network If you are behind a proxy, please make sure that thenpm 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! C:\Users\zhang\AppData\Roaming\npm-cache\_logs\2018-10-27T03_17_38_423Z-debug.logC:\Users\zhang>npm get registryhttps://registry.npm.taobap.org/C:\Users\zhang>npm config set registry https://registry.npmjs.org/C:\Users\zhang>npm install -g hexo-cliC:\Users\zhang\AppData\Roaming\npm\hexo -> C:\Users\zhang\AppData\Roaming\npm\node_modules\hexo-cli\bin\hexonpm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\hexo-cli\node_modules\fsevents):npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})+ hexo-cli@1.1.0added 225 packages from 431 contributors in 78.995sC:\Users\zhang>
找到了更好的办法:感谢互联网
感谢万能的网友!
转载地址:http://cmwji.baihongyu.com/