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

Importing LeapJS result in an error #265

Open
tsepton opened this issue Nov 29, 2022 · 0 comments
Open

Importing LeapJS result in an error #265

tsepton opened this issue Nov 29, 2022 · 0 comments

Comments

@tsepton
Copy link

tsepton commented Nov 29, 2022

With the Orion software installed (4.1.0+52211) and LeapJS installed through npm (1.1.1), the following line import * as Leap from "leapjs"; resulted in the following error:

Uncaught TypeError: Cannot read properties of undefined (reading 'prototype')
    at node_modules/leapjs/lib/controller.js (controller.js:717:50)
    at __require (chunk-OL3AADLO.js?v=ce322448:9:50)
    at node_modules/leapjs/lib/index.js (index.js:6:15)
    at __require (chunk-OL3AADLO.js?v=ce322448:9:50)
    at dep:leapjs:1:16

Seems like EventEmitter is undefined inside the controller.js file:

Object.assign(Controller.prototype, EventEmitter.prototype);

PS: The "Allow Web Apps" ticking option is checked within the Leap Motion Control Panel.

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

1 participant