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

ReferenceError on import to node #32

Open
aknoerig opened this issue Oct 14, 2016 · 2 comments
Open

ReferenceError on import to node #32

aknoerig opened this issue Oct 14, 2016 · 2 comments

Comments

@aknoerig
Copy link

When I require leapjs-plugins 0.1.11 inside node, I'm currently getting this error:

.../node_modules/leapjs-plugins/main/playback/leap.playback-0.2.1.js:1835
}( window ));
   ^

ReferenceError: window is not defined
    at Object.<anonymous> (.../node_modules/leapjs-plugins/main/playback/leap.playback-0.2.1.js:1835:4)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (.../node_modules/leapjs-plugins/index.js:5:1)
    at Module._compile (module.js:556:32)
@aknoerig
Copy link
Author

I guess this makes sense because a server doesn't have a notion of a window. So maybe a comment in the docs would help.

And then why is there a node leapjs-plugins package at all?

@raimo
Copy link
Contributor

raimo commented Oct 14, 2016

Sorry for the trouble @aknoerig. That's a good question (maybe there's benefits to people using some browser package managers?), but pretty much all of the plugins in leapjs-plugins were built to address browser interaction issues.

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

2 participants