-
Notifications
You must be signed in to change notification settings - Fork 10
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
Errors when I try to add the consentcookie to my Laravel project #12
Comments
Reproduced the issue using the downloaded version:Issue is only when Vue (Standard in every new Laravel project) is used on the page. Without Vue on a site it works perfectly. The full list of error messages:
|
@stillfinder @timvaniersel I think it has to do with Laravel using Vue as its front-end framework. Vue in ConsentCookie is isolated and not polluting the global scope, but seeing the error Vuex isn`t. I don't have a Lavarel project atm so I can't definitly confirm it. |
To see the error: https://jsfiddle.net/StevenChooNL/0jchLx6w/ |
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
Context
I can't use ConsentCookie
Your Environment
Laravel 5.4
The text was updated successfully, but these errors were encountered: