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

TypeError when running hexo server #4052

mcdanielisaac opened this issue Jan 4, 2020 · 2 comments

TypeError when running hexo server #4052

mcdanielisaac opened this issue Jan 4, 2020 · 2 comments


Copy link

@mcdanielisaac mcdanielisaac commented Jan 4, 2020

Check List

Please check followings before submitting a new issue.

  • I have already read Docs page & Troubleshooting page
  • I have already searched existing issues and they are not help to me
  • I examined error or warning messages and it's difficult to solve
  • Using the latest version of Hexo (run hexo version to check)
  • Node.js is higher than 8.6.0


Full error message at the bottom. When running hexo server or hexo generate I'm getting the message TypeError: Cannot convert undefined or null to object. This was working on 4.0.0 but then I updated the package.json to 4.2.0 and it stopped. Reverte to 4.0.0, ran hexo clean, removed the node_modules folder and re-ran yarn install. The error persists after those steps.

Environment & Settings

Node.js & npm version

node v13.5.0
npm 6.13.4
yarn 1.21.1

Your site _config.yml (Optional)

# Hexo Configuration
## Docs:
## Source:

# Site
title: Chainsaw Rendezvous
description: "Weekend long festival in Ridgway, PA showcasing the art of Chainsaw Carving"
author: Appalachian Arts Studio
language: en

## If your site is put in a subdirectory, set url as '' and root as '/child/'
root: /
permalink: :year/:month/:day/:title/

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

# Writing
new_post_name: # 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: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
  enable: true
  line_number: true
  auto_detect: false
# 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)
  path: ''
  per_page: 10
  order_by: -date
# Category & Tag
default_category: uncategorized

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
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:
## Themes:
theme: chainsaw

# Deployment
## Docs:

# Aliases
## Docs:
  "schedule/": "2020/schedule"
  "map/": "2020/map"
  "carvers/": "2020/carvers"
  "carver-info/": "2020/carver-info"
  "vendor-info/": "2020/vendor-info"
  "vendors/": "2020/vendor-info"
  "sponsors/": "2020/sponsor-info"
  "media/": "2020/media-info"
  "entertainment/": "2020/entertainment"

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

rendezvous-hexo@1.0.0 /Users/isaac/Development/chainsaw-rendezvous-hexo
├── braces@3.0.2
├── hexo@4.2.0
├── hexo-browsersync@0.3.0
├── hexo-generator-alias@0.1.3
├── hexo-generator-archive@1.0.0
├── hexo-generator-category@1.0.0
├── hexo-generator-tag@1.0.0
├── hexo-renderer-ejs@1.0.0
├── hexo-renderer-marked@2.0.0
├── hexo-server@1.0.0
├── node-pre-gyp@0.6.39 extraneous
└── save@2.4.0

npm ERR! extraneous: node-pre-gyp@0.6.39 /Users/isaac/Development/chainsaw-rendezvous-hexo/node_modules/node-pre-gyp

Your package.json package.json

  "name": "rendezvous-hexo",
  "version": "1.0.0",
  "private": true,
  "hexo": {
    "version": "4.2.0"
  "dependencies": {
    "braces": "^3.0.2",
    "hexo": "^4.0.0",
    "hexo-generator-alias": "git+",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-server": "^1.0.0",
    "save": "^2.4.0"
  "devDependencies": {
    "hexo-browsersync": "^0.3.0"


TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at getKeys (~/site/node_modules/deepmerge/dist/cjs.js:61:16)
    at mergeObject (~/site/node_modules/deepmerge/dist/cjs.js:86:2)
    at deepmerge (~/site/node_modules/deepmerge/dist/cjs.js:117:10)
    at deepMerge (~/site/node_modules/hexo-util/lib/deep_merge.js:22:10)
    at new Locals (~/site/node_modules/hexo/lib/hexo/index.js:368:22)
    at ~/site/node_modules/hexo/lib/hexo/index.js:417:49
    at tryCatcher (~/site/node_modules/bluebird/js/release/util.js:16:23)
    at MappingPromiseArray._promiseFulfilled (~/site/node_modules/bluebird/js/release/map.js:68:38)
    at MappingPromiseArray.PromiseArray._iterate (~/site/node_modules/bluebird/js/release/promise_array.js:115:31)
    at MappingPromiseArray.init (~/site/node_modules/bluebird/js/release/promise_array.js:79:10)
    at Promise._settlePromise (~/site/node_modules/bluebird/js/release/promise.js:601:21)
    at Promise._settlePromise0 (~/site/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (~/site/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (~/site/node_modules/bluebird/js/release/promise.js:673:18)
    at Promise._resolveCallback (~/site/node_modules/bluebird/js/release/promise.js:466:57)
    at ReductionPromiseArray._resolve (~/site/node_modules/bluebird/js/release/reduce.js:60:19)
    at Promise.completed [as _fulfillmentHandler0] (~/site/node_modules/bluebird/js/release/reduce.js:133:15)
    at Promise._settlePromise (~/site/node_modules/bluebird/js/release/promise.js:601:21)
    at Promise._settlePromise0 (~/site/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (~/site/node_modules/bluebird/js/release/promise.js:729:18)
    at _drainQueueStep (~/site/node_modules/bluebird/js/release/async.js:93:12)

This comment has been minimized.

Copy link

@mcdanielisaac mcdanielisaac commented Jan 5, 2020

In my original issue post, I did not include my theme’s _config.yml file because it was empty. However that seems to be the issue. With the added ability to merge the config files there appears to need to be something in the file or it returns the error above.


This comment has been minimized.

Copy link

@stevenjoezhang stevenjoezhang commented Jan 5, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.