I got this kind error in the new vue-loader11.2.0
Syntax Error: Unexpected token {
@ ./~/vue-style-loader!./~/css-loader?{"minimize":false,"sourceMap":false}!./~/vue-loader/lib/style-compiler?{"id":"data-v-e0d15f88","scoped":false,"hasInlineConfig":false}!./~/vue-loader/lib/selector.js?type=styles&index=0!./src/App.vue 4:14-303 13:3-17:5 14:22-311
@ ./src/App.vue
@ ./src/main.js
@ multi ./wwwroot/dev-client ./src/main.js
error in ./src/components/Hello.vue
which in "[email protected]" it works perfectly
More information:
It is crashing because I have
<style scope>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
in my .Vue files and if I delete those, it compiles
They are using es6 features in published package, you may need to upgrade your node.
I have the same problem with @Pezhin . I believe @cpylua is right. It is because of the version of node. I am using 5.5.0.
@h657070128: same here, I am using 5.5.0
@cpylua: so upgrading node is a must here?
Upgrading to node7 fixed this problem for me.
6.2.0 is enough in my case.
+1
+1
upgrading node
thanks,The problem has been solved. you need update your node version
There should not be a breaking change or a requirement to upgrade Node for a minor version upgrade.
I accidentally used ES2015 destructuring in some refactored code which is not supported in Node below 6. Fixed in 11.3.2.
Most helpful comment
I accidentally used ES2015 destructuring in some refactored code which is not supported in Node below 6. Fixed in 11.3.2.