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

Hexo deploy error #4281

Closed
Reverier-Xu opened this issue Apr 28, 2020 · 17 comments · Fixed by #4285
Closed

Hexo deploy error #4281

Reverier-Xu opened this issue Apr 28, 2020 · 17 comments · Fixed by #4285
Labels
duplicate This issue or pull request already exists

Comments

@Reverier-Xu
Copy link

when I tried to deploy my blog it shows:

$ hexo g -d
(node:482144) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:482144) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:482144) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:482144) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:482144) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:482144) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
INFO  Files loaded in 842 ms
INFO  0 files generated in 669 ms
INFO  Deploying: git
INFO  Clearing .deploy_git folder...
INFO  Copying files from public folder...
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
TypeError [ERR_INVALID_ARG_TYPE]: The "mode" argument must be integer. Received an instance of Object
    at copyFile (fs.js:1890:10)
    at tryCatcher (/home/reverier/文档/Blog/node_modules/bluebird/js/release/util.js:16:23)
    at ret (eval at makeNodePromisifiedEval (/usr/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
    at /home/reverier/文档/Blog/node_modules/hexo-fs/lib/fs.js:144:39
    at tryCatcher (/home/reverier/文档/Blog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:673:18)
    at Promise._resolveCallback (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:466:57)
    at Promise._settlePromiseFromHandler (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:559:17)
    at Promise._settlePromise (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:673:18)
    at Promise._resolveCallback (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:466:57)
    at Promise._settlePromiseFromHandler (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:559:17)
    at Promise._settlePromise (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/home/reverier/文档/Blog/node_modules/bluebird/js/release/promise.js:673:18)

hexo s and hexo g both work well and generate properly.

How to solve this problem?

It may not be caused by themes, I tried three themes and they all have this problem.

the _config.yml of ny blog:

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

# Site
title: Reverier's Blog
subtitle: Hope, Marvel, Youth.
description: Hope, Marvel, Youth.
keywords: None
google-site-verification: <xxxx>
author: Reverier Xu
language: zh-CN
timezone: Asia/Shanghai

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: https://www.wootec.top
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: :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: 0
render_drafts: true
post_asset_folder: false
relative_link: false
future: true

# 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: 7
  order_by: -date

# 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: amazing
plugins:
  hexo-generate-feed
  #- hexo-generator-baidu-sitemap
  #- hexo-generator-sitemap

#baidusitemap:
#path: baidusitemap.xml
#sitemap:
#path: sitemap.xml
sitemap:
  path: sitemap.xml

search:
  path: search.xml
  field: post
  content: true
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
  type: git
  repository: git@github.com:Reverier-Xu/Reverier-Xu.github.io.git
  branch: master
@stevenjoezhang stevenjoezhang added the duplicate This issue or pull request already exists label Apr 28, 2020
@stephen-a2z
Copy link

nodejs 12.5.0 is working

@dumindu
Copy link

dumindu commented Apr 28, 2020

@stephen-a2z I tried exact v12.5.0. But this(hexojs/site) generates empty files with partial template block codes. Any idea how to avoid that?

@pwittchen
Copy link

I have the same issues.

@pwittchen
Copy link

pwittchen commented Apr 28, 2020

I made it work on Node 8.17.0 and Hexo 3.9.0.

@stevenjoezhang stevenjoezhang linked a pull request Apr 30, 2020 that will close this issue
2 tasks
@curbengh
Copy link
Contributor

curbengh commented Apr 30, 2020

#4260

Fix released in hexo-util@2.0.0 and hexo-fs@3.0.0.

There are two options to temporarily fix compatibility issues with Node 14:

  1. Downgrade to Node 10 or 12. If you use .nvmrc as part of your CI workflow, you need to change the content to 10 or 12.
  2. If you prefer to use Node 14, force upgrade hexo-util and hexo-fs:
package.json
{
  ...
  "dependencies": {
    "hexo": "^4.0.0",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-index": "^1.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-server": "^1.0.0",
+    "hexo-util": "^2.1.0",
+    "hexo-fs": "^3.0.1"
  }
}
$ rm -rf node_modules/
$ npm install

@pwittchen
Copy link

I tried to update my dependencies according to the @curbengh comment, but I still received some errors and it didn't work.

With the following dependencies and node v. 8.17.0 it works fine:

{
  ...
  "dependencies": {
    "gulp": "^4.0.2",
    "gulp-cli": "^2.2.0",
    "hexo": "^3.1.0",
    "hexo-browsersync": "^0.3.0",
    "hexo-cli": "^3.1.0",
    "hexo-fs": "^3.0.1",
    "hexo-generator-alias": "^0.1.3",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-feed": "^2.2.0",
    "hexo-generator-restful": "^0.2.3",
    "hexo-generator-sitemap": "^2.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-jade": "^0.5.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-server": "^1.0.0",
    "npm": "^6.14.4",
    "npm-upgrade": "^2.0.3"
  },
  "optionalDependencies": {
    "fsevents": "*"
  }
}

Regards

@Reverier-Xu
Copy link
Author

Reverier-Xu commented May 5, 2020

I tried to continue to use hexo by downgrading node, he did work normally for a few days but since archlinux was upgraded yesterday, some of the node.js dependencies have also been upgraded, which means that if I continue to use the old version of node, all libraries which node.js is dependent on need to be downgraded, which I think is unacceptable. Hope that the official can release the solution as soon as possible.

$ hexo g -d
node: error while loading shared libraries: libicui18n.so.65: cannot open shared object file: No such file or directory
$

@yoshinorin
Copy link
Member

@Reverier-Xu @stephen-a2z @dumindu @pwittchen

We published v4.2.1.
v4.2.1 has included fixed compatible with Node 14.

Thanks :)

@pwittchen
Copy link

pwittchen commented May 14, 2020

Thanks, but on my computer I still get errors with Node 14.0.0 and Hexo 4.2.1

error message looks like this:

hexo generate
(node:88407) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency 
(Use `node --trace-warnings ...` to show where the warning was created)
(node:88407) Warning: Accessing non-existent property 'column' of module exports inside circular dependency 
(node:88407) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:88407) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency 
(node:88407) Warning: Accessing non-existent property 'column' of module exports inside circular dependency 
(node:88407) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency

and empty files are generated.

Nevertheless, it works fine on Node 8.17.0

@FRTI64
Copy link

FRTI64 commented May 16, 2020

I have been updated Hexo to the v4.2.1.
But I still have the same problem.
nodejs: 14.2.0
Need I restart my computer?

@yoshinorin
Copy link
Member

@pwittchen @THE-NAMELESS-SPECTRE
Did you update your hexo in package.json ?

// package.json
"dependencies": {
-    "hexo": "^4.2.0",
+    "hexo": "^4.2.1",

After that please update your package and check your hexo version like below.

$ npm update
$ hexo -v

hexo: 4.2.1
hexo-cli: 3.1.0
os: Windows_NT 10.0.18362 win32 x64
node: 14.2.0
v8: 8.1.307.31-node.33
uv: 1.37.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.16.0
modules: 83
nghttp2: 1.40.0
napi: 6
llhttp: 2.0.4
openssl: 1.1.1g
cldr: 36.1
icu: 66.1
tz: 2019c
unicode: 13.0

@pwittchen
Copy link

pwittchen commented May 16, 2020

Yes.

Here's my package.json file:

{
  "name": "wittchen.io",
  "version": "0.0.1",
  "private": true,
  "hexo": {
    "version": "4.2.1"
  },
  "engines": {
    "node": ">=8.10.0 <14"
  },
  "dependencies": {
    "gulp": "^4.0.2",
    "gulp-cli": "^2.2.0",
    "hexo": "^4.2.1",
    "hexo-browsersync": "^0.3.0",
    "hexo-cli": "^3.1.0",
    "hexo-fs": "^3.0.1",
    "hexo-generator-alias": "^0.1.3",
    "hexo-generator-archive": "^1.0.0",
    "hexo-generator-category": "^1.0.0",
    "hexo-generator-feed": "^2.2.0",
    "hexo-generator-restful": "^0.2.3",
    "hexo-generator-sitemap": "^2.0.0",
    "hexo-generator-tag": "^1.0.0",
    "hexo-renderer-ejs": "^1.0.0",
    "hexo-renderer-jade": "^0.5.0",
    "hexo-renderer-marked": "^2.0.0",
    "hexo-renderer-stylus": "^1.1.0",
    "hexo-server": "^1.0.0",
    "npm": "^6.14.5",
    "npm-upgrade": "^2.0.3"
  },
  "optionalDependencies": {
    "fsevents": "*"
  }
}

This is my output from hexo -v:

hexo: 4.2.1
hexo-cli: 3.1.0
os: Linux 5.6.12-arch1-1 linux x64
node: 13.14.0
v8: 7.9.317.25-node.32
uv: 1.37.0
zlib: 1.2.11
brotli: 1.0.7
ares: 1.16.0
modules: 79
nghttp2: 1.40.0
napi: 6
llhttp: 2.0.4
openssl: 1.1.1g
cldr: 36.1
icu: 66.1
tz: 2019c
unicode: 13.0

I checked it on Node v. 8.17.0, v. 12.6.3 and 13.14.0 and it works on these versions. It has problems with Node v. 14.0.0 and 14.2.0 (the latest one) only (so 14.x in general).

@yoshinorin
Copy link
Member

@pwittchen

Hmm...

Are your hexo-fs and hexo-utils in node_modules include this PR change and this PR change?

If yes, which problem is occurring?
Accessing non-existent property or empty files are generated or both problems?

@WinterSoHot
Copy link

My situation is the same as him.

$ hexo s
INFO  Start processing
INFO  Hexo is running at http://localhost:4000 . Press Ctrl+C to stop.
(node:156811) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:156811) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'column' of module exports inside circular dependency
(node:156811) Warning: Accessing non-existent property 'filename' of module exports inside circular dependency
$ hexo d
INFO  Deploying: git
INFO  Clearing .deploy_git folder...
INFO  Copying files from public folder...
FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html
TypeError [ERR_INVALID_ARG_TYPE]: The "mode" argument must be integer. Received an instance of Object
    at copyFile (fs.js:1890:10)
    at tryCatcher (/home/dongxian/github.io/node_modules/bluebird/js/release/util.js:16:23)
    at ret (eval at makeNodePromisifiedEval (/usr/lib/node_modules/hexo-cli/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:13:39)
    at /home/dongxian/github.io/node_modules/hexo-deployer-git/node_modules/hexo-fs/lib/fs.js:144:39

@yoshinorin
Copy link
Member

yoshinorin commented May 19, 2020

@WinterSoHot
It seems caused by hexo-fs. hexo-deployer-git depends on hexo-fs and hexo-fs@2.0.0 is incompatible with Node.js 14.

We are already released hexo-fs@2.0.1 that supports Node.js 14.
Would you please re-install hexo-deployer-git?

I think, after re-install hexo d will work well.

@WinterSoHot
Copy link

Thanks. I have solved this problem by your advice.

@techbless
Copy link

@yoshinorin Thank you.

DCMMC added a commit to DCMMC/DCMMC.github.io that referenced this issue Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants