HumanInput icon indicating copy to clipboard operation
HumanInput copied to clipboard

__VERSION__ global not defined

Open DavidVollmers opened this issue 6 years ago • 2 comments

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: https://github.com/liftoff/HumanInput/blob/b96967b41afb4c7293848be19a4061024132bdbc/src/humaninput.js#L99

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)

DavidVollmers avatar Jul 31 '18 18:07 DavidVollmers

is this project abandoned?

br4nnigan avatar Feb 19 '19 10:02 br4nnigan

It is...

DavidVollmers avatar Feb 19 '19 10:02 DavidVollmers