Skip to content

Importing LeapJS result in an error #265

@tsepton

Description

@tsepton

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions