npm安裝hexo報錯
阿新 • • 發佈:2018-11-08
npm安裝hexo報錯:
- 可見是淘寶映象的問題,
- 檢視自己當前的映象
npm get registry
, - 然後切換為原來的映象
npm config set registry https://registry.npmjs.org/
, - 安裝成功,特此記錄.
C:\Users\zhang>npm install -g hexo-cli npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npm.taobap.org/hexo-cli failed, rea son: getaddrinfo ENOTFOUND registry.npm.taobap.org registry.npm.taobap.org: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 settin gs. 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! C:\Users\zhang\AppData\Roaming\npm-cache\_logs\2018-10-27T03_17_38_ 423Z-debug.log C:\Users\zhang>npm get registry https://registry.npm.taobap.org/ C:\Users\zhang>npm config set registry https://registry.npmjs.org/ C:\Users\zhang>npm install -g hexo-cli C:\Users\zhang\AppData\Roaming\npm\hexo -> C:\Users\zhang\AppData\Roaming\npm\no de_modules\hexo-cli\bin\hexo npm WARN optional SKIPPING OPTIONAL DEPENDENCY:
[email protected] (node_modules\hex o-cli\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected] 1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"} ) + [email protected] added 225 packages from 431 contributors in 78.995s C:\Users\zhang>
update :
找到了更好的辦法:感謝網際網路
http://roderic.cn/2017/06/14/搭建hexo部落格的具體流程/
http://visugar.com/2017/05/04/20170504SetUpHexoBlog/
感謝萬能的網友!