Skip to content

Errors when I try to add the consentcookie to my Laravel project #12

@stillfinder

Description

@stillfinder

Description

When I try to add the script to my Laravel project I'm getting multiple JS errors: http://joxi.ru/EA4BYJ9UD39Pvm

[Error] [vuex] already installed. Vue.use(Vuex) should be called only once.
[Error] TypeError: undefined is not an object (evaluating 'D.$store.state') — viewService.js:93
[Error] TypeError: undefined is not an object (evaluating 'M.$services') — consentService.js:119
[Error] TypeError: undefined is not an object (evaluating 'D.$store.commit') — viewService.js:158
[Error] TypeError: undefined is not an object (evaluating 'this.$store.state') — consentcookie.min.js:4473
[Error] TypeError: undefined is not an object (evaluating 'D.$store.state')

Expected Behavior

The script is working as expected

Actual Behavior

multiple JS errors (see above)

Possible Fix

Steps to Reproduce

  1. Build your own ConsentCookie or use downloaded version
  2. Include to a Laravel project using <script src="/path/to/consentcookie.min.js"></script>
  3. Initialize ConsentCookie
  4. Open your site and check the js console

Context

I can't use ConsentCookie

Your Environment

Laravel 5.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions