Reputation: 33
I am not sure if I did anything wrong. This is all I did,
I followed the documentation to do the installation.
I had git and nodejs preinstalled, to install hexo cli I ran this,
sudo npm install -g hexo-cli
Then I checked if hexo is installed by running hexo -v
and it showed version and everything, this is what it showed.
hexo-cli: 4.2.0
os: Linux 4.19.0-14-amd64 linux x64
http_parser: 2.9.4
node: 10.24.0
v8: 6.8.275.32-node.59
uv: 1.24.1
zlib: 1.2.11
brotli: 1.0.7
ares: 1.14.0
modules: 64
nghttp2: 1.41.0
napi: 7
openssl: 1.1.1d
icu: 63.1
unicode: 11.0
cldr: 34.0
tz: 2018e
Then went ahead and created a new folder called hexosite with this command,
hexo init hexosite
it created the folder and everything. So to see if everything worked I ran
hexo server
. And came up with this error, I didn't change anything anywhere. This is the error message.
INFO Validating config
INFO Start processing
FATAL { err:
TypeError: line.matchAll is not a function
at res.value.res.value.split.map.line (/home/seek/Data/hexosite/node_modules/hexo-util/lib/highlight.js:128:26)
at Array.map (<anonymous>)
at closeTags (/home/seek/Data/hexosite/node_modules/hexo-util/lib/highlight.js:126:37)
at highlight (/home/seek/Data/hexosite/node_modules/hexo-util/lib/highlight.js:119:10)
at highlightUtil (/home/seek/Data/hexosite/node_modules/hexo-util/lib/highlight.js:23:16)
at data.content.dataContent.replace (/home/seek/Data/hexosite/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:92:17)
at String.replace (<anonymous>)
at Hexo.backtickCodeBlock (/home/seek/Data/hexosite/node_modules/hexo/lib/plugins/filter/before_post_render/backtick_code_block.js:19:30)
at Hexo.tryCatcher (/home/seek/Data/hexosite/node_modules/bluebird/js/release/util.js:16:23)
at Hexo.<anonymous> (/home/seek/Data/hexosite/node_modules/bluebird/js/release/method.js:15:34)
at Promise.each.filter (/home/seek/Data/hexosite/node_modules/hexo/lib/extend/filter.js:67:52)
at tryCatcher (/home/seek/Data/hexosite/node_modules/bluebird/js/release/util.js:16:23)
at Object.gotValue (/home/seek/Data/hexosite/node_modules/bluebird/js/release/reduce.js:166:18)
at Object.gotAccum (/home/seek/Data/hexosite/node_modules/bluebird/js/release/reduce.js:155:25)
at Object.tryCatcher (/home/seek/Data/hexosite/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/seek/Data/hexosite/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/home/seek/Data/hexosite/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromiseCtx (/home/seek/Data/hexosite/node_modules/bluebird/js/release/promise.js:641:10)
at _drainQueueStep (/home/seek/Data/hexosite/node_modules/bluebird/js/release/async.js:97:12)
at _drainQueue (/home/seek/Data/hexosite/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/home/seek/Data/hexosite/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/home/seek/Data/hexosite/node_modules/bluebird/js/release/async.js:15:14) } 'Something\'s wrong. Maybe you can find the solution here: %s' '\u001b[4mhttps://hexo.io/docs/troubleshooting.html\u001b[24m'
I have no experience with hexo, this is the first time I decided to play with it. I read their documentation on troubleshooting, but didn't find anything about this.
If you know anything about this please feel free to answer, thank you in advance!
Upvotes: 1
Views: 655
Reputation: 1170
UPDATE:
Function String.matchAll()
is supported in Node.js from version 12.0.0
, so, upgrade your nodejs to a version greater than 12.0.0
.
OR
Changing the value of config item highlight->enable
in file _config.xml
from true
to false
, this can avoid the exception.
highlight:
enable: false
But, this will turn off code highlighting.
Upvotes: 2