Skip to content
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

TypeError: _cookie_js2.default.get is not a function #1

Closed
griffinmichl opened this issue Apr 15, 2016 · 7 comments
Closed

TypeError: _cookie_js2.default.get is not a function #1

griffinmichl opened this issue Apr 15, 2016 · 7 comments

Comments

@griffinmichl
Copy link

Can't seem to get this driver working. The example in the README throws this error.

@wiktor-obrebski
Copy link
Contributor

can you tell me more about this error? I just run this example on more or less clean environment and this work fine for me. I need more details.

@wiktor-obrebski
Copy link
Contributor

wiktor-obrebski commented Apr 17, 2016

it looks like you have not installed cookie_js dependency.
it's required by this package package.json file and should be automatically installed if you use
npm install cyclejs-cookie command. can you check if it is located in your node_modules directory?

@wiktor-obrebski
Copy link
Contributor

second option is that you just need to add it as direct dependency to your index.html file (it is case when you don't use webpack or have it configured incorrectly)

@savuori
Copy link

savuori commented Aug 19, 2016

I have the same problem. There seems to be problem with brunch, switching to webpack made the error go away without any other changes.

@wiktor-obrebski
Copy link
Contributor

wiktor-obrebski commented Aug 28, 2016

@savuori just published new version where I use my fork of cookie_js library. problem have source in way how cookie_js export it's api - it's work a little diffrent for CommonJS and AMD system.

I create PR for library creator here, but 10clouds/cyclejs-cookie use my local fork temporary, so it should work properly.
florian/cookie.js#39

Let me know if it fixed the problem for you.

@wiktor-obrebski
Copy link
Contributor

I consider it as fixed.

@beatrizmf
Copy link

do it this way:

if (typeof window !== 'undefined') {
  Cookie.get('name');
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants