N
N
Nikolay Semenov2017-04-06 16:27:45
JavaScript
Nikolay Semenov, 2017-04-06 16:27:45

Why don't you like the syntax?

Guys, hello.
Tell me what is the joke of the error, it seems everything is like in the docks

/~/babel-loader/lib!./~/vue-loader/lib/selector.js?type=script&index=0!./src/pages/CartPage.vue
Module build failed: SyntaxError: C:/OpenServer/domains/pizzaStore/src/pages/CartPage.vue: Unexpected token (36:8)

  34 | export default {
  35 |     computed: {
> 36 |         ...mapGetters ({
     |         ^
  37 |             products: 'cartProducts',
  38 |             checkoutStatus: 'checkoutStatus'
  39 |         }),

 @ ./src/pages/CartPage.vue 7:2-105
 @ ./src/router.js
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js

what is wrong?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolay Semyonov, 2017-04-06
@nickola105

decided by myself... you need to install this little thing
babeljs.io/docs/plugins/transform-object-rest-spread

E
Evgeny Kulakov, 2017-04-06
@kulakoff Vue.js

The curly brace seems to be missing:

computed: {
  ...mapGetters ({
    products: 'cartProducts',
    checkoutStatus: 'checkoutStatus'
  })
},

Or do you have some other methods going on there?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question