hexojs / hexo

A fast, simple & powerful blog framework, powered by Node.js.
https://hexo.io
MIT License
38.85k stars 4.76k forks source link

在终端中键入‘hexo <command>’类命令返回错误结果 | Typing a command like 'hexo <command>' in the terminal returns incorrect results #5036

Closed lopkuiughio closed 1 year ago

lopkuiughio commented 1 year ago

Check List

Please check followings before submitting a new issue.

Expected behavior

hexo 执行clean命令,完成后执行deploy部署

Actual behavior

hexo提示“Validating config”后便提示“FATAL”且无任何提示,对,只有FATAL,没有别的

How to reproduce?

Step1 编辑description部分的内容 Step2 出现错误,且删除description部分的内容仍然存在问题

Is the problem still there under "Safe mode"?

它甚至无法运行安全模式命令,仍然输出同一结果

Environment & Settings

Node.js & npm version(node -v && npm -v)

v16.17.0
8.15.0

Your site _config.yml (Optional)

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

# Site
title: i dont want to show it
subtitle: i dont want to show it
description: ''
keywords: 
author: i dont want to show it
language: zh-CN
timezone: Asia/Shanghai

# URL
## Set your site url here. For example, if you use GitHub Page, set url as 'https://username.github.io/project'
url: http://lopkuiughio.github.io/
#permalink: :year/:month/:day/:title/
#permalink_defaults:
permalink: posts/:abbrlink/
abbrlink:
  alg: crc32 #support crc16(default) and crc32
  rep: dec   #support dec(default) and hex

# 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: 未分类的文章
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: 5
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: volantis

# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: git
  repo: https://github.com/lopkuiughio/lopkuiughio.github.io.git
  branch: gh-pages
  message: site updated

Hexo and Plugin version(npm ls --depth 0)

├── hexo-deployer-heroku@0.1.2
└── hexo-theme-volantis@5.7.4

Your package.json package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "deploy": "hexo deploy",
    "server": "hexo server"
  },
  "hexo": {
    "version": "6.2.0"
  },
  "dependencies": {
    "hexo": "^6.2.0",
    "hexo-abbrlink": "^2.2.1",
    "hexo-deployer-git": "^3.0.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^2.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-helper-qrcode": "^1.0.2",
    "hexo-renderer-ejs": "^2.0.0",
    "hexo-renderer-marked": "^5.0.0",
    "hexo-renderer-stylus": "^2.1.0",
    "hexo-server": "^3.0.0",
    "hexo-theme-landscape": "^0.0.3",
    "hexo-theme-volantis": "^5.7.4"
  }
}

Others

lopkuiughio commented 1 year ago

虽然显示了heroku,但我其实是又安装了hexo-deployer-git并使用其部署,并未使用heroku部署

lopkuiughio commented 1 year ago

找到了,是自己写的volantis主题配置文件问题