Skip to main content

I wanted to check out vue and use it for my next project. I wanted to use Hooper, a image carousel. I've installed it via npm install hooper. Now in my script file I use

  import { Hooper, Slide } from 'hooper';
  import 'hooper/dist/hooper.css';

  export default {
    name: 'App',
    components: {
      Hooper,
      Slide
    }
  }

But that already throws an error in the first line: Uncaught SyntaxError: Unexpected token {

Uncaught SyntaxError: Unexpected token {

I've already installed it in one folder above the script file, besides it, and in a folder, but the js filejs file does not recognize the bracket. How do I solve this?

I wanted to check out vue and use it for my next project. I wanted to use Hooper, a image carousel. I've installed it via npm install hooper. Now in my script file I use

  import { Hooper, Slide } from 'hooper';
  import 'hooper/dist/hooper.css';

  export default {
    name: 'App',
    components: {
      Hooper,
      Slide
    }
  }

But that already throws an error in the first line: Uncaught SyntaxError: Unexpected token {

I've already installed it one folder above the script file, besides it, and in a folder, but the js file does not recognize the bracket. How do I solve this?

I wanted to check out vue and use it for my next project. I wanted to use Hooper, a image carousel. I've installed it via npm install hooper. Now in my script file I use

  import { Hooper, Slide } from 'hooper';
  import 'hooper/dist/hooper.css';

  export default {
    name: 'App',
    components: {
      Hooper,
      Slide
    }
  }

But that already throws an error in the first line:

Uncaught SyntaxError: Unexpected token {

I've already installed it in one folder above the script file, besides it, and in a folder, but the js file does not recognize the bracket. How do I solve this?

edited tags
Link
Phil
  • 165.6k
  • 25
  • 265
  • 269
Source Link
user8587113
user8587113

vue plugin throws error Uncaught SyntaxError: Unexpected token {

I wanted to check out vue and use it for my next project. I wanted to use Hooper, a image carousel. I've installed it via npm install hooper. Now in my script file I use

  import { Hooper, Slide } from 'hooper';
  import 'hooper/dist/hooper.css';

  export default {
    name: 'App',
    components: {
      Hooper,
      Slide
    }
  }

But that already throws an error in the first line: Uncaught SyntaxError: Unexpected token {

I've already installed it one folder above the script file, besides it, and in a folder, but the js file does not recognize the bracket. How do I solve this?