-
Notifications
You must be signed in to change notification settings - Fork 23
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
Module build failed: SyntaxError for version 1.9.0 #14
Comments
The issues seams to be with the parsing of |
Just found this issue myself... I was able to correct it by manually specifying "vue-template-es2015-compiler" : "1.8.2",
"@vue/component-compiler-utils" : "2.5.2" In my package.json to revert back to older versions of the package. edit: And now I am implementing package-lock.json to prevent this from happening again. I wasn't using it previously which allowed this issue to even affect me. |
Yeah, repro steps (at least at the time of this comment) are simply:
Then just add Definitely seems to be |
For Yarn users (https://yarnpkg.com/lang/en/docs/selective-version-resolutions/):
And also add resolutions field to package.json
only version lock in package.json without resolution field didn't work for me |
Latest dist tag on npm has been pinned to 1.8.2 (along with |
Fixed in 1.9.1. |
It’s actually more than I did some spelunking into the vue compiler and it’s anywhere inside a generated action, like The vue compiler translates If vue-compiler outputs I stumbled on this because I was working with a teammate to upgrade our team’s project from a CLI 2 template. We followed this blog post and eventually hit this bug. So we reduced it to the input tag with a non-range type. (Like, this bug doesn’t impact radio or checkbox inputs.) Ok, so what changed between the old and the new project? Time to start digging into the configs. I couldn’t find anything significant. We also reduced to the base case of an input, and found that text type and generated v-on to be a problematic case of code generation. My next step was to generate a new project with Vue CLI 3, and add that input. It worked. And the error was not present. So I tried using So now we have the old project, new project, and the test input project. Only new project fails. Webpack config seem the same. Then I spent most of the next two days researching, reading up on Webpack, Babel, and looking at Vue source code and configs. Today my teammate spun up a repl and tried testing the vue compiler and es2015 transpired directly. We hit a snag and ran out of time, but after all of this I was thinking it might be ESLint. My teammate suggested filing a bug here, so started that process. Thatd when I saw that Takeaways for me:
|
After the update to 1.9.0 the building process using webpack and vue-loader fails using Vue-loader@14.2.2.
This Vue-loader version has an internal dependency to vue-template-es2015-compiler.
The vue-loader's package.json has a compatible version semantic (""vue-template-es2015-compiler": "^1.6.0"") which probably directs it to the latest compatible.
The last successful build with Vue-loader@14.2.2 used vue-template-es2015-compiler@1.8.2 .
Below is the error:
![image](https://user-images.githubusercontent.com/19610831/53210939-39fdf280-3648-11e9-89fe-a7a4a4d182dd.png)
The console log shows the error in the compiled file that is generated from the vue-template component rather than in the pre-compiled template source code.
The text was updated successfully, but these errors were encountered: