0

I have to save token in cookie of browser (in my case Chrome). I found https://github.com/10clouds/cyclejs-cookie this resource and installed version 0.5.0. When I set something to cookie I receive this kind of error:

_cookie_js2.default.set is not a function(anonymous function)

When debug on chrome it tells me under cookie_js2.default have object cookie and under this have function set. Can anybody tried to use this driver?

Or can anybody show an example to use Cookie driver for cycle js?

qfwfq
  • 2,416
  • 1
  • 17
  • 30
Nurlan Mirzayev
  • 1,120
  • 1
  • 7
  • 15

1 Answers1

2

This was bug related to the way this library loads (CommonJS vs AMD loading differnces).

It should be fixed in current version, so just install 0.7.4 version (or newer when available).

more information: https://github.com/10clouds/cyclejs-cookie/issues/1 https://github.com/florian/cookie.js/pull/39

Chris Charles
  • 4,406
  • 17
  • 31
  • A link to a potential solution is always welcome, but please [add context around the link](http://meta.stackoverflow.com/a/8259/169503) so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. Take into account that being barely more than a link to an external site is a possible reason as to [Why and how are some answers deleted?](http://stackoverflow.com/help/deleted-answers) – Dan Mindru Oct 12 '16 at 10:55