next-theme / hexo-theme-next

🎉 Elegant and powerful theme for Hexo.
https://theme-next.js.org
Other
2.41k stars 426 forks source link

v8.15.0 hexo g 报错 ENOENT: no such file or directory #623

Closed VeggieOrz closed 1 year ago

VeggieOrz commented 1 year ago

Issue Checklist

Expected behavior

预期:成功生成

Actual behavior

Steps to reproduce the behavior

拉 next 主题,然后 hexo clean, hexo g

Node.js and NPM Information

v17.0.1
8.1.0

Package dependencies Information

hexo-site@0.0.0 /Users/veggie/Documents/blog
├── chalk@5.2.0 -> ./node_modules/.store/chalk@5.2.0/node_modules/chalk
├── css@3.0.0 -> ./node_modules/.store/css@3.0.0/node_modules/css
├── hexo-deployer-git@4.0.0 -> ./node_modules/.store/hexo-deployer-git@4.0.0/node_modules/hexo-deployer-git
├── hexo-generator-archive@2.0.0 -> ./node_modules/.store/hexo-generator-archive@2.0.0/node_modules/hexo-generator-archive
├── hexo-generator-category@2.0.0 -> ./node_modules/.store/hexo-generator-category@2.0.0/node_modules/hexo-generator-category
├── hexo-generator-index@3.0.0 -> ./node_modules/.store/hexo-generator-index@3.0.0/node_modules/hexo-generator-index
├── hexo-generator-tag@2.0.0 -> ./node_modules/.store/hexo-generator-tag@2.0.0/node_modules/hexo-generator-tag
├── hexo-renderer-ejs@2.0.0 -> ./node_modules/.store/hexo-renderer-ejs@2.0.0/node_modules/hexo-renderer-ejs
├── hexo-renderer-marked@6.0.0 -> ./node_modules/.store/hexo-renderer-marked@6.0.0/node_modules/hexo-renderer-marked
├── hexo-renderer-stylus@2.1.0 -> ./node_modules/.store/hexo-renderer-stylus@2.1.0/node_modules/hexo-renderer-stylus
├── hexo-server@3.0.0 -> ./node_modules/.store/hexo-server@3.0.0/node_modules/hexo-server
├── hexo-theme-landscape@0.0.3 -> ./node_modules/.store/hexo-theme-landscape@0.0.3/node_modules/hexo-theme-landscape
├── hexo-util@3.0.1 -> ./node_modules/.store/hexo-util@3.0.1/node_modules/hexo-util
├── hexo@6.3.0 -> ./node_modules/.store/hexo@6.3.0/node_modules/hexo
├── js-yaml@4.1.0 -> ./node_modules/.store/js-yaml@4.1.0/node_modules/js-yaml
├── nunjucks@3.2.3 -> ./node_modules/.store/nunjucks@3.2.3/node_modules/nunjucks
└── prismjs@1.29.0 -> ./node_modules/.store/prismjs@1.29.0/node_modules/prismjs

Hexo Configuration

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: VeggieOrz's Blog  # 站点名称
subtitle: ''
description: '' # 站点描述
keywords:
author: Veggie # 作者
language: zh-CN # 站点语言
timezone: ''

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: http://example.com
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
  trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link:
  enable: true # Open external links in new tab
  field: site # Apply to the whole site
  exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace: ''
  wrap: true
  hljs: false
prismjs:
  enable: false
  preprocess: true
  line_number: true
  tab_replace: ''

# Home page setting
# path: Root path for your blogs index page. (default = '')
# per_page: Posts displayed per page. (0 = disable pagination)
# order_by: Posts order. (Order by date descending by default)
index_generator:
  path: ''
  per_page: 10
  order_by: -date

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## updated_option supports 'mtime', 'date', 'empty'
updated_option: 'mtime'

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: git
  repo: https://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@github.com/VeggieOrz/VeggieOrz.github.io.git
  branch: main

NexT Configuration

null

Other Information

No response

welcome[bot] commented 1 year ago

Thanks for opening this issue, maintainers will get back to you as soon as possible!

ljcbaby commented 1 year ago

Maybe you need read https://theme-next.js.org/docs/getting-started/#Configuration-Files

github-actions[bot] commented 1 year ago

We would appreciate it if you could provide us with more info about this issue!

VeggieOrz commented 1 year ago

这个报错原因提示不太明显,根据排查后,发现 highlight.js 是一个 module,而我没有安装这个 module。下载后解决了。

npm install highlight.js


This error message is not very obvious. According to the investigation, I found that highlight.js is a module, and I did not install this module. Solved after downloading.

stevenjoezhang commented 1 year ago

你用的包管理器应该不是 npm?./node_modules/.store/ 目录下的依赖包没有被认出来。

github-actions[bot] commented 5 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. It is possible issue was solved or at least outdated. Feel free to open new for related bugs.