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

Change the required node version #321

Closed
wants to merge 1 commit into from
Closed

Change the required node version #321

wants to merge 1 commit into from

Conversation

whoan
Copy link
Contributor

@whoan whoan commented May 2, 2018

I was getting this error:

$ node bin/vuepress dev docs
SyntaxError: Invalid regular expression: /(?<=(^|/))(index|readme).md$/: Invalid group
at Object. (/data/proyectos/blog/vuepress/lib/prepare.js:239:17)

The problem is that RegExp lookbehind was implemented in V8 in version v6.2.103 and it was just merged into the node engine in version 8.10.

Check this forum for more information.

I was getting this error:

>$ node bin/vuepress dev docs
SyntaxError: Invalid regular expression: /(?<=(^|\/))(index|readme)\.md$/: Invalid group
    at Object.<anonymous> (/data/proyectos/blog/vuepress/lib/prepare.js:239:17)

The problem is that [**RegExp lookbehind** was implemented in V8 in version v6.2.103][look-behind-v8] and it [was just merged into the node engine in version 8.10][look-behind-node].

Check [this forum][forum] for more information.

[look-behind-v8]: https://chromium.googlesource.com/v8/v8.git/+/473a6f5b03651fde33fd7b3228a7dc4e38e24914
[look-behind-node]: https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V8.md#8.10.0
[forum]: https://groups.google.com/forum/#!msg/v8-users/r-SN2yuKTL8/pfwrSuqSBQAJ
@meteorlxy
Copy link
Member

meteorlxy commented May 2, 2018

Oh thanks, I didn't notice that. I added this in PR #308.

I fact, there are other implementations to fix that bug, but lookbehind only need to change a single line.

@meteorlxy
Copy link
Member

@ulivz Better to change the node version or change the regex?

@whoan
Copy link
Contributor Author

whoan commented May 2, 2018

@meteorlxy Just in case, I created an alternative PR to avoid lookbehind: #323

@ulivz
Copy link
Member

ulivz commented May 2, 2018

Thanks! I think that changing regexp would be a better choice.

Closing as this has been done in #323

@ulivz ulivz closed this May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants