Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

博客无法生成页面 #22

Open
time-todie opened this issue Mar 3, 2020 · 4 comments
Open

博客无法生成页面 #22

time-todie opened this issue Mar 3, 2020 · 4 comments

Comments

@time-todie
Copy link

time-todie commented Mar 3, 2020

和Hexo 4.2去除cheerio依赖的改动有关吗?之前用Hexo 3.8没出问题。升级到Hexo 4.2后,每次打完hexo g都会报Error: Cannot find module ‘cheerio’。

我的运行环境如下:
hexo: 4.2.0
hexo-cli: 3.1.0
os: Windows_NT 10.0.17763 win32 x64
http_parser: 2.8.0
node: 10.16.3
v8: 6.8.275.32-node.54
uv: 1.28.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.15.0
modules: 64
nghttp2: 1.39.2
napi: 4
openssl: 1.1.1c
icu: 64.2
unicode: 12.1
cldr: 35.1
tz: 2019a


重装过Hexo、重装过nodejs、重装过git for win10 x64……都无法解决问题。

@astroxu
Copy link

astroxu commented Mar 19, 2020

Hexo 4.2去除cheerio依赖,但是hexo-theme-huhu还是有cheerio依赖的。你需要这样做:

  1. 切换至themes/hexo-theme-huhu路径下,并执行npm install命令初始化
  2. 执行 npm install --save cheerio ,安装cheerio并写到package.json文件中
  3. 再次执行npm install命令初始化
  4. 切换到博客项目根目录再次运行 npm run server试下应该就可以了

希望能帮到你😊

@time-todie
Copy link
Author

Hexo 4.2去除cheerio依赖,但是hexo-theme-huhu还是有cheerio依赖的。你需要这样做:

  1. 切换至themes/hexo-theme-huhu路径下,并执行npm install命令初始化
  2. 执行 npm install --save cheerio ,安装cheerio并写到package.json文件中
  3. 再次执行npm install命令初始化
  4. 切换到博客项目根目录再次运行 npm run server试下应该就可以了

希望能帮到你😊

谢谢。改天试试。

@Vichin0215
Copy link

Hexo 4.2去除cheerio依赖,但是hexo-theme-huhu还是有cheerio依赖的。你需要这样做:

切换至themes/hexo-theme-huhu路径下,并执行npm install命令初始化
执行 npm install --save cheerio ,安装cheerio并写到package.json文件中
再次执行npm install命令初始化
切换到博客项目根目录再次运行 npm run server试下应该就可以了

希望能帮到你😊

我也有这个问题,用你的方法已经解决啦,感谢!

@machgeek
Copy link

Hexo 4.2去除cheerio依赖,但是hexo-theme-huhu还是有cheerio依赖的。你需要这样做:

  1. 切换至themes/hexo-theme-huhu路径下,并执行npm install命令初始化
  2. 执行 npm install --save cheerio ,安装cheerio并写到package.json文件中
  3. 再次执行npm install命令初始化
  4. 切换到博客项目根目录再次运行 npm run server试下应该就可以了

希望能帮到你😊

方法有效,感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants