sahilm / reddit.js

Reddit API wrapper for the browser
MIT License
197 stars 27 forks source link

window is not defined #8

Closed thany closed 7 years ago

thany commented 7 years ago

Trying to use this with Node 8.7. The moment I try to anything with reddit.js, I get an error:

ReferenceError: window is not defined

My node script contains literally only this:

const reddit = require("reddit.js");

And it crashes on that line, obviously.

sahilm commented 7 years ago

Thanks for trying out reddit.js. Unfortunately it cannot be used in node.js. It's only meant to be used inside a browser.