-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Getting “SyntaxError: invalid range in character class” when I upgrade to Vue 2.6.0 #9491
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
Comments
Do you have this problem with v2.6.6 as well? |
Yes. I initially updated straight to 2.6.6 from 2.5.21 and when I kept seeing this error, downgraded back to 2.5.21 and did incremental updates until the error started appearing again in 2.6.0. |
It likely has something to do with 9c71852 which was introduced in v2.6. Can you share which browser you're using to produce this problem and add a screenshot of the error message as well? PS: I likely can't fix the problem, but the devs will have better insight if those details are provided to them. Thanks! |
I tried locally with a fresh cli project and adding the CSS but I couldn't reproduce the problem. Maybe it comes from a dependency you are using. |
ok, I understand. |
It doesn't look like the problem is in the CSS, but the error is gone when I delete the CSS block in that vue file that the error occurred. I will investigate some more with the dependencies. Thank you. |
I have the same problem |
Version
2.6.0
Reproduction link
https://codesandbox.io/s/7y6n3mk2o1
I cannot fully reproduce this issue in the online IDEs because this issue only occurs when I build and deploy for production, but I included my
main.js
file and added my dependencies.Steps to reproduce
My backend is
Spring Boot
. I'm building the frontend by runningnpm run build
and having it copied to the resources folder of mySpring Boot
set up via thepom.xml
. I've updated myVue
to2.6.0
and I get an error message in my browser console.The odd thing is that I only get it when I deploy to production with the
npm run build
command. I tried deploying to prod withvue-cli-service build --mode development
and it worked fine so it looks like there seems to be an issue when it gets minified or built for production.My
package.json
looks like it's running the correct commands according to this block:What is expected?
I expect the page to at least load.
What is actually happening?
The page is blank and I get this error message:
When I use
Vue-CLI 3
to "serve" under the task menu, which looks like it runs the command$ vue-cli-service serve --mode development --dashboard
, there are no errors and everything works fine.Before upgrading to
2.6.0
, I was on2.5.22
and everything was working great. To try and narrow down the problem, I tried a lot of things that were a waste of time, but what I noticed was that when I deleted the<style>...</style>
block of theExportTable.vue
file that I was getting the error in, the error would no longer come up inExportTable.vue
and instead show up in the parent component.I also tried deleting each css selector block 1 by 1 and building/deploying to production to see if it was a particular CSS block that was causing it, but the error continued to show up until I deleted all the CSS blocks and the
<style>...</style>
tags themselves.I think this might be related to this issue from 2016: #2291
I also made a stackoverflow post about it: https://stackoverflow.com/questions/54659200/why-am-i-getting-syntaxerror-invalid-range-in-character-class-when-i-upgrade
The text was updated successfully, but these errors were encountered: