cookie icon indicating copy to clipboard operation
cookie copied to clipboard

Failing to run in nodejs

Open jameslnewell opened this issue 10 years ago • 1 comments

I'm trying to use this library in a universaljs app but am getting errors due to document being undefined.

This could be easily fixed by using var document = require("global/document") from global... Unfortunately global doesn't have a component.json file.

Any suggestions for getting this library working on nodejs? Happy to do a PR.

jameslnewell avatar Dec 21 '15 04:12 jameslnewell

To get this work, I'm pretty sure you will need to do versions of cookie: two separate files for the server and client, similar to https://github.com/srph/cookie-machine/tree/master/lib.

srph avatar Jan 17 '17 05:01 srph