Closed tilmans closed 7 years ago
Thank you for your kind report! And sorry for the late response. I'm quite busy in recent days because it is soon coming the Chinese new year.
Seems that there is no direct reason to cause such a problem. I would try to reproduce it, but may be somehow late. Sorry for that.
gong xi fa cai - i'll give it another look later, maybe one of the dependencies has issues which are resolved now.
Just faced the same issue with Node v5.0.0 and npm 3.3.6. It looks like the problem is somewhere outside hexo-renderer-plugin, because the failure happens during asciidoctor.js
initialization. I've put this 1.js
into scripts
directory ("a light-weight plugin"):
require('asciidoctor.js')();
and it happened. Perhaps a monkey patch somewhere?
According to http://asciidoctor.org/docs/install-and-use-asciidoctorjs/
The asciidoctor.js project is a direct port of Asciidoctor from Ruby to JavaScript using the Opal Ruby-to-JavaScript cross compiler.
There may be conflicts between asciidoctor.js and other dependencies in hexo. We need to locate the root cause and report it to upstream.
Thank you @loki2302 , you made a good minimal steps to reproduce it.
I have experienced the same error with Node.js 5.10.1 and NPM 3.8.6. I also noticed this odd behaviour when installing this plugin:
$ npm install hexo-renderer-asciidoc --save
hexo-site@0.0.0 /home/fusion809/GitHub/hexo-site
├── asciidoctor.js@1.5.5-1 extraneous
└── JSONStream@1.0.6 extraneous
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.11
If relevant I am operating on Arch Linux.
Oh and I found out why I am getting this error. Hexo 3.2.0 requires Warehouse 2.2.0, which in turn requires JSONStream≥1.0.7. So it installs JSONStream 1.1.1 which conflicts with JSONStream 1.0.6
Sorry for late response. It currently works with Hexo 3.2.2 with Node 6.10.0.
After adding the plugin to my hexo project I get the following error when running
hexo generate
:Here's the list of all installed modules, Node.js is v4.2.1: