Coder Social home page Coder Social logo

Bug 回报:Linux上的谜之启动错误(TypeError: Cannot read properties of undefined (reading 'main')) about kratos-rebirth HOT 7 OPEN

zh-jp avatar zh-jp commented on June 10, 2024
Bug 回报:Linux上的谜之启动错误(TypeError: Cannot read properties of undefined (reading 'main'))

from kratos-rebirth.

Comments (7)

ArcticLampyrid avatar ArcticLampyrid commented on June 10, 2024

一直在Linux镜像下自动构建,未遇到过类似问题
考虑发一下您的具体配置信息吗?

from kratos-rebirth.

zh-jp avatar zh-jp commented on June 10, 2024

版本信息:

Linux version 3.10.0-1160.80.1.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Nov 8 15:48:59 UTC 2022

内核信息:

Linux VM-12-6-centos 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

_config.yml

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

# Site
title: XXX
subtitle: XXX
description: ''
keywords:
author: [email protected]
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: 
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: kratos-rebirth

theme: landscape
# Deployment
## Docs: https://hexo.io/docs/one-command-deployment
deploy:
  type: ''

_config.kratos-rebirth.yml

site_logo: /images/siteLogo.webp
avatarUri: /images/avatar.webp

topMenu:
  - label: 首页
    icon: home
    url: /
  - label: 档案馆
    icon: file
    url: /archives/
  - label: 好伙伴
    icon: pase
    url: /friends/
  - label: 链接
    icon: link
    submenu:
      - label: 作者博客
        url: https://XXXX
      - label: 项目链接
        url: https://github.com/zh-jp

vendors:
  # 常用CDN基地址:
  # https://unpkg.com/
  # https://cdn.jsdelivr.net/npm/

  # 以下一行代码指定 npm cdn 基地址,该 CDN 应该兼容 jsdelivr 使用的路径格式
  # npm_cdn: https://cdn.jsdelivr.net/npm/
  packages:
    hexo-theme-kratos-rebirth: 
      # 以下一行代码用于对某个包单独配置 cdn 基地址,使用 null 表示不从 cdn 获取此包
      # cdn_url: null
      # cdn_url: https://cdn.jsdelivr.net/npm/hexo-theme-kratos-rebirth@latest/
    aplayer:
      # 以下一行代码指定所使用的库版本
      # 默认情况下会使用主题开发组进行开发调试时所使用的版本(通常而言也是最适合的版本)
      # 因此该值不建议修改
      # 
      # 注意:如果选择其他版本,则必须配置 npm_cdn 或 为包单独配置 cdn_url 或 修改 vendors 目录,
      # 这是因为主题自带的库只含有默认版本,必须从 cdn 加载其他版本或由用户手动提供其他版本的相关文件
      #
      # 警告:随意切换版本可能造成主题无法正常工作
      # 
      # version: 1.10.1
      files:
        "dist/APlayer.min.css":
          # 以下代码用于单独对某个文件进行映射,以便于使用不符合 jsdelivr 路径格式的CDN(或其他特殊情形)
          # 使用 null 表示不重定向(默认行为)
          # relocate: null
          # relocate: https://cdn.jsdelivr.net/npm/[email protected]/dist/APlayer.min.css

          # 以下代码用于指定 SRI 以增强安全性
          # 注意,仅有部分组件支持 SRI,不支持的组件会忽略此值
          # integrity: sha256-6Y7CJDaltoeNgk+ZftgCD9jLgmGv4xKUo8nQ0HgAwVo=

friends:
  list:
  - name: "猫猫①号"
    bio: "喵~"
    avatar: "../images/avatar.webp"
    link: "https://candinya.com"
  - name: "猫猫②号"
    bio: "喵喵~"
    avatar: "../images/avatar.webp"
    link: "https://candinya.com"
  - name: "猫猫⑨号"
    bio: "咪啪~"
    avatar: "../images/avatar.webp"
    link: "https://candinya.com"

# Post Page 文章页配置
posts:
  show_cc: false
  donate: true
  share: true
  comments: 
    provider: gitalk

gitalk:
  clientID: d36fb9e52XXXXXXXX
  clientSecret: 59a38ceXXXXXXXXX
  repo: gitalk-comments
  owner: zh-jp
  admin: 
    - zh-jp
  distractionFreeMode: false
contact:
  weibo: 
  mail: [email protected] 
  twitter:  
  linkedin: 
  telegram: 
  fediverse:
    instance: 
    username: 
  github: zh-jp

timenotice: 
icp: 这是icp的位置
psr: 这是psr的位置

from kratos-rebirth.

ArcticLampyrid avatar ArcticLampyrid commented on June 10, 2024

手动添加以下内容到 _config.kratos-rebirth.yml 试试
虽然理论上有默认值才对

jsconfig:
  main:
    cover:
      randomAmount: 20 # 表示从1~20
      baseUrl: null # 使用默认值(不单独配置),将跟随 vendors 中的相关设定选择是否使用 cdn
      filenameTemplate: "thumb_{no}.webp" 
    createTime: "2018/05/06 17:03:12"
    donateBtn: "支持我~"
    scanNotice: "扫一扫,好不好?"
    qr_alipay: "/images/alipayqr.webp"
    qr_wechat: "/images/wechatpayqr.webp"
    siteLeaveEvent: false
    leaveTitle: "{{{(>_<)}}}哦哟,崩溃啦~"
    returnTitle: "(*´∇`*)欸,又好啦~"
    copyrightNotice: "该内容采用 CC BY-NC-SA 4.0 许可协议,著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。"
    expire_day: 30
    topNavScrollToggle: true

from kratos-rebirth.

zh-jp avatar zh-jp commented on June 10, 2024

神了,真的可以(虽然不敢保证下次会不会再犯)
大佬能讲解下原理吗

from kratos-rebirth.

zh-jp avatar zh-jp commented on June 10, 2024

非常感谢您的回复!

from kratos-rebirth.

ArcticLampyrid avatar ArcticLampyrid commented on June 10, 2024

报错是缺少xxx配置项,所以加上试试
但理论上 Kratos-Rebirth 目录下还有一个 _config.yml 来做 fallback 才对,具体细节可能需要进一步的分析
您的安装方式是?clone到themes目录下还是通过npm的?

from kratos-rebirth.

zh-jp avatar zh-jp commented on June 10, 2024

使用的npm

from kratos-rebirth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.