攻克:bash: hexo command not found 问题解决

有段时间没有使用git,写了一篇博文,要部署到github上时报错,百度之后,解决方案如下:

检查nodejs是否安装

使用git bash 输入以下命令

$  node -v

检查npm是否安装

$ npm -v

我检查之后,显示版本号,说明问题不是出在这里。
攻克:bash: hexo command not found 问题解决_第1张图片

检查hexo相应模块是否安装

进入你的文件夹,查看node_modules
攻克:bash: hexo command not found 问题解决_第2张图片

检查环境变量(win7下)

在 “计算机”右击属性,进入 高级环境配置 ,选择环境变量,在Path里添加你的node_modules下的.bin文件路径

攻克:bash: hexo command not found 问题解决_第3张图片

重要的一步:在你的项目文件夹下打开git bash

$ hexo g -d

现在就可以将静态页面放到github上啦!!!

你可能感兴趣的:(git,hexo,git,hexo,解决方案)