Summer Sale! All accounts are 50% off this week.

masonfox's avatar

Spark 2.0 XSRF Error

I'm running Laravel 5.3, but the weird thing is that Spark v1 works and upgrading to Spark v2 is not.

v-cloak is not removed, nor do I receive the Application Ready console log.

I receive this error:

Uncaught TypeError: Cannot read property 'set' of undefined

And if I follow it, this is what I get:

request.headers.set('X-XSRF-TOKEN', Cookies.get('XSRF-TOKEN'));

Any help is appreciated!!! Thanks!

0 likes
2 replies
masonfox's avatar
masonfox
OP
Best Answer
Level 3

Vue resource needs to be upgraded in package.json:

"vue-resource": "~1.0.1"
1 like
aakarim's avatar

Perfect. Thanks @masonfox ! The Spark documentation really isn't clear on that one.

Please or to participate in this conversation.