Hexo搭建博客的时候,已经使用命令在cmd中下载了依赖包,但是执行 hexo d 和hexo g 报错,报错如截图:

ERROR Local hexo not found in D:\hexo

ERROR Try running:'npm install hexo --save'

搭建Hexo博客在git上执行 hexo d /hexo g 报错:ERROR Local hexo not found in D:\hexo 解决

导致这个原因为在自己的博客文件夹中,.gitignore文件中添加了node_modules/,导致更新的时候,这个文件夹被忽略,没有被更新上去。

搭建Hexo博客在git上执行 hexo d /hexo g 报错:ERROR Local hexo not found in D:\hexo 解决

解决方案:

    1.cmd进入博客当前文件夹路径

    2.执行 npm install

    3.执行 hexo server

    4.执行成功后,再到博客下的git中执行 hexo d /hexo g 发现可以执行成功。

搭建Hexo博客在git上执行 hexo d /hexo g 报错:ERROR Local hexo not found in D:\hexo 解决

相关文章:

  • 2021-10-29
  • 2022-01-13
  • 2019-10-19
  • 2022-02-28
  • 2022-02-26
  • 2021-06-18
猜你喜欢
  • 2021-04-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2021-11-04
  • 2021-06-12
相关资源
相似解决方案