Hexo: `hexo generate` 不能用

Created on 7 Nov 2016  ·  3Comments  ·  Source: hexojs/hexo

before you submit your issue, please delete all the example code in template

Environment Info

hexo: 3.2.2
hexo-cli: 1.0.2
os: Linux 3.13.0-36-generic linux x64
http_parser: 2.7.0
node: 7.0.0
v8: 5.4.500.36
uv: 1.9.1
zlib: 1.2.8
ares: 1.10.1-DEV
icu: 57.1
modules: 51
openssl: 1.0.2j

Your site _config.yml

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

# Site
title: Chez Léo
subtitle: Blog of Xiaojie LI(Léo)
description: Bienvenue chez moi !
author: Xiaojie LI
language: en
timezone: Europe/Paris

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://xiaojieli.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

# 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: :year_:month_:day_:title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 1
render_drafts: false
post_asset_folder: true
relative_link: false
future: true
highlight:
  enable: true
  line_number: true
  auto_detect: false
  tab_replace:

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# 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

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

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

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type:

# Rss
feed:
  type: atom
  path: atom.xml
  limit: 20

Plugin version(npm ls --depth 0)

[email protected] /home/ajblog/chez-leo
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

For BUG

新手求救!
我在 macOS 上创建项目,一切正常。然后传到 Github 再 pull 到我在 DigitalOcean 上的虚拟机就不行了, 无论是 hexo generate 还是 hexo server 都不能用,症状都是先出现 INFO Start processing,等了很久之后就出现 1] 9310 killed hexo generate[1] 9403 killed hexo server,如图:

image

补充一下信息:我只有一个 post,四个 page,当运行 hexo g 的时候系统资源如图:

image

Most helpful comment

问题已经解决,原因是 Digital Ocean 的 Ubuntu Droplet 默认 Swap 空间为0,从而导致 NPM 不正常,详情请看:NPM gets killed no matter what.

解决方法简单:

sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024k
sudo mkswap /swapfile
sudo swapon /swapfile

参考:How To Add Swap on Ubuntu 12.04

All 3 comments

能否贴下 hexo --debug 生成的内容~

@NoahDragon 运行 hexo --debug 之后一直卡着不动

image

问题已经解决,原因是 Digital Ocean 的 Ubuntu Droplet 默认 Swap 空间为0,从而导致 NPM 不正常,详情请看:NPM gets killed no matter what.

解决方法简单:

sudo dd if=/dev/zero of=/swapfile bs=1024 count=1024k
sudo mkswap /swapfile
sudo swapon /swapfile

参考:How To Add Swap on Ubuntu 12.04

Was this page helpful?
0 / 5 - 0 ratings

Related issues

demurgos picture demurgos  ·  3Comments

mashirozx picture mashirozx  ·  3Comments

hgDendi picture hgDendi  ·  3Comments

ghost picture ghost  ·  3Comments

hjmJhon picture hjmJhon  ·  3Comments