-
-
Notifications
You must be signed in to change notification settings - Fork 94
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 identity escape in regular expression' in Firefox after upgrading to v6.0.0 #63
Comments
@EthanSbbn Your issue is just that you didn't read the release notes which clearly state that Node.js 10 is required now. |
No, it’s expected that you read release notes. Especially for major versions. |
@sindresorhus I have nodejs 12.16.3, and I get:
In firefox, with v6, but will downgrade. So it's not just a "You need a newer node version" issue. Perhaps specify that this is a ES2018 issue? |
@phun-ky Tests are passing on 12.16.3: https://travis-ci.com/github/sindresorhus/camelcase/jobs/321547607 You probably have multiple Node.js versions installed. |
Hm, I use nvm, but the package is built / installed with the current node version active, as per spec right? For example, node sass (deps? ) needs to be recompiled/installed if you change versions. Is not an issue for me, but dont be hasty saying that everything works just because the test passes. |
With nodejs 12.16.1 on Gentoo. I'm not using nvm so it is not a case of using an older/different node version. Also reproducible standalone:
Oddly enough, in a
Update: I found out why it's failing: Node on Gentoo does not enable the |
adguardhome (v0.105.0) compilation fails because of the following error: .../webpack/lib/cli.js:66 .replace( ^ SyntaxError: Invalid regular expression: /(\p{Uppercase_Letter}+|\p{Lowercase_Letter}|\d)(\p{Uppercase_Letter}+)/: Invalid escape After googling the issue it came out that nodejs has to be compiled with icu support enabled [1]. According to the nodejs documentation, small icu do not need any dependencies to download [2]. ldd command doesn't reveal any new shared libraries linked into the node binary. After applying following changes adguardhome's compilation went flawlessly. [1]: sindresorhus/camelcase#63 (comment) [2]: https://github.com/nodejs/node/blob/f2c26153d79564afe893d8135be616af402d0136/BUILDING.md#trimmed-small-icu-english-only-support Signed-off-by: Dobroslaw Kijowski <dobo90@gmail.com>
I get this error in Firefox only:
SyntaxError: invalid identity escape in regular expression
though in Chrome it works okay.
Steps to reproduce:
then open index.html in Firefox and you'll see blank page and the error in console.
After this commit fix: downgrade to camelcase v5.3.1 to fix syntax error in Firefox which fixes the error
reload index.html and it works as intended without errors
The text was updated successfully, but these errors were encountered: