熱崇 | Cult OW! OW!

如何升級Hexo和Vercel

互聯網  ·  

作为一个比较迷恋升级的伪类程序员哪能不尝鲜
有了新版本我就会迷信的认为新版本的东西肯定好用功能多了呀
所以Hexo我也希望是最新版本于是开始升级Hexo

这里再加上vercel的安装方法

Hexo升级

  1. 全局升级hexo-clihexo version 或者hexo v查看当前版本然后npm i hexo-cli -g再次hexo v查看是否升级成功
  2. 使用npm install -g npm-checknpm-check检查系统中的插件是否有升级的可以看到自己都安装过哪些插件
  3. 使用npm install -g npm-upgradenpm-upgrade升级系统中的插件
  4. 使用npm update -gnpm update --save

报错

如果以上最后一步出错提示如下

> [email protected] install /Users/lanvnal/Files/blog/node_modules/hexo/node_modules/fsevents
> node-gyp rebuild

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!

其实已经安装过了xcode cli但是这里还是报错了估计和苹果新系统有关重装就好了操作如下

如果像以前一样执行xcode-select --install会有如下报错

xcode-select: error: command line tools are already installed, use "Software Update" to install updates

解决办法

sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install

然后再执行第四步完美升级

vercel 安装(Download Vercel)

$ npm i -g vercel

$ yarn global add vercel

So easy!!

# # # # #