Cannot read property 'get' of undefined (cookie)
See original GitHub issueAfter installed your module, i had got a fatal error “Cannot read property ‘get’ of undefined” with getToken method in .nuxt/strapi.js line 148 on all pages.
getToken () { return this.$cookies.get(TOKEN_KEY) }
I don’t understand why do you retrieve token in constructor because to register we don’t need a jwt-token.
Version
@nuxtjs/strapi: 0.1.7 nuxt: 2.14.6
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
TypeError: Cannot read property 'cookie' of undefined
When calling my User.create method in my Sails.js app, I get the following error:.
Read more >Cannot read property 'get' of undefined (cookie) #60 - GitHub
After installed your module, i had got a fatal error "Cannot read property 'get' of undefined" with getToken method in .nuxt/strapi.js line ...
Read more >Cannot read property 'set' of undefined - Laracasts
... I receive this error : "Cannot read property 'set' of undefined" It says it's a javascript error, if (Cookies.get('XSRF-TOKEN') !== undef.
Read more >cookieControl-9.0.min.js:1 Uncaught (in promise) TypeError
cookieControl-9.0.min.js:1 Uncaught (in promise) TypeError: Cannot read property 'analytics' of undefined. My optionalCookies object looks like this:.
Read more >Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError: Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an undefined...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@dimst I had to change the order of the modules in nuxt.config.js, I put strapi first and it worked
You can use
this.$strapi.$cookies
(https://strapi.nuxtjs.org/strapi#cookies)