You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Expected behavior
Actual behavior
Throw the following error:
FATAL Invalid regular expression flags
/Users/hahaxy/blog/node_modules/hexo/lib/plugins/filter/after_render/meta_generator.js:10
return data.replace(/<head>(?!<\/head>).+?<\/head>/s, str => str.replace('</head>', `${hexoGeneratorTag}</head>`));
^
SyntaxError: Invalid regular expression flags
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:607:28)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
How to reproduce?
Step1
$ hexo init blog
Step2
$ cd blog
Step3
$ hexo generate
I've tried other commands (like 'hexo clean', 'hexo server', 'hexo version'...), the same error.
Environment & Settings
Node.js & npm version
node version: v8.9.4
npm version: 6.13.4
Your site _config.yml (Optional)
# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/
# Site
title: Hexo
subtitle: ''
description: ''
keywords:
author: John Doe
language: en
timezone: ''
# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://yoursite.com
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:
pretty_urls:
trailing_index: true # Set to false to remove trailing 'index.html' from permalinks
trailing_html: true # Set to false to remove trailing '.html' from permalinks
# 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:
enable: true # Open external links in new tab
field: site # Apply to the whole site
exclude: ''
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
enable: true
line_number: true
auto_detect: false
tab_replace: ''
wrap: true
hljs: 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)
index_generator:
path: ''
per_page: 10
order_by: -date
# Category & Tag
default_category: uncategorized
category_map:
tag_map:
# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true
# 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
## Use post's date for updated date unless set in front-matter
use_date_for_updated: false
# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page
# Include / Exclude file(s)
## include:/exclude: options only apply to the 'source/' folder
include:
exclude:
ignore:
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: landscape
# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: ''
Your theme _config.yml (Optional)
# Header
menu:
Home: /
Archives: /archives
rss: /atom.xml
# Content
excerpt_link: Read More
fancybox: true
# Sidebar
sidebar: right
widgets:
- category
- tag
- tagcloud
- archive
- recent_posts
# display widgets at the bottom of index pages (pagination == 2)
index_widgets:
# - category
# - tagcloud
# - archive
# widget behavior
archive_type: 'monthly'
show_count: false
# Miscellaneous
google_analytics:
gauges_analytics:
favicon: /favicon.png
twitter:
google_plus:
fb_admins:
fb_app_id:
To add on to previous comment, I suggest to update Node 10 or 12 if possible. Node 8 is going to reach end-of-life in less than 2 days. The upcoming Hexo v5 is going to drop Node 8.
Check List
Please check followings before submitting a new issue.
hexo version
to check)Expected behavior
Actual behavior
Throw the following error:
How to reproduce?
I've tried other commands (like 'hexo clean', 'hexo server', 'hexo version'...), the same error.
Environment & Settings
Node.js & npm version
Your site
_config.yml
(Optional)Your theme
_config.yml
(Optional)Hexo and Plugin version(
npm ls --depth 0
)Your package.json
package.json
Others
The text was updated successfully, but these errors were encountered: