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
SyntaxError: Invalid regular expression flags #4123
Comments
Both Node.js6 and 8 are outdated: https://nodejs.org/en/about/releases/ |
Er...... 这个正则表达式如果不用/s模式是不是确实会导致安全性问题?这个我还不是特别清楚。还请告知。 |
hexo will not support < 8 and you can use see: https://www.npmjs.com/package/@babel/helper-create-regexp-features-plugin and this issue should be closed |
and single-line mode cannot remove directly, see this example hexo/test/scripts/filters/meta_generator.js Lines 61 to 73 in 7f0537f
|
@himself65 Thank you for your answer and your pr. Although it has been closed, but it works for me. 这个用正则替换在head里加上generator的功能,粗暴一点直接先找到head里面里面有name="generator"的给去掉,然后直接把替换成不就好啦? |
so it is fine to delete 's', right |
FATAL Invalid regular expression flags
node_modules\hexo\lib\plugins\filter\after_render\meta_generator.js:10
I upgrade my hexo from 3.8 to 4.2 .
First I find this error when I use NodeJS8.9.0 and check the Issues then I find the resolution:upgrade my nodejs version to 8.17.0 and it worked.
But I need run hexo on TencentCloud Serverless Framework which only have nodejs6.10 and 8.9.0 environment. So I must fixed this problom.
Becouse of node8.9.0 not support the regular flags 's', it only have 'i' 'm' and 'g'.
Then I delete the /s in the RegExp and it worked fine.
So can we fixed this probloms?
Sorry for my bad english.
The text was updated successfully, but these errors were encountered: