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

window is not defined #1

Open
kbmanikanta opened this issue Nov 30, 2018 · 2 comments
Open

window is not defined #1

kbmanikanta opened this issue Nov 30, 2018 · 2 comments

Comments

@kbmanikanta
Copy link

Hi,
I am getting the following error. can you please help me?

this._store = window.localStorage
              ^

ReferenceError: window is not defined
at new LocalStorage (C:\Live\quickstart\node\node_modules\localstorage\index.js:4:19)
at Object. (C:\Live\quickstart\node\index.js:25:22)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)

@monojack
Copy link

Are you trying to use it in Node?

@heapwolf
Copy link
Member

oh yeah, this is a browser-side module. Were you hoping to find an isomorphic localstorage solution? if so, would be open to a PR that somehow allowed that.

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

3 participants