Skip to content

__VERSION__ global not defined #18

@DavidVollmers

Description

@DavidVollmers

Hello there,

I am using your library inside a TypeScript project.

When importing and using the HumanInput class like the following...

import HumanInput from 'humaninput/src/humaninput-full.js'

...

new HumanInput(window)

...this error is thrown:
Uncaught ReferenceError: __VERSION__ is not defined

The problem is that there is global __VERSION__ required at:

this.VERSION = __VERSION__;

A hacky hotfix for me was to set the global after the import like this:

import HumanInput from 'humaninput/src/humaninput-full.js'

eval( 'window.__VERSION__ = 0' )

...

new HumanInput(window)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions