3rd-Eden / useragent

Useragent parser for Node.js, ported from browserscope.org
MIT License
897 stars 137 forks source link

2.2.0 gives "regexps is not defined" error #113

Closed speedfirst closed 7 years ago

speedfirst commented 7 years ago

once require('useragent')(), you will see

ReferenceError: regexps is not defined
    at updating (/------/node_modules/useragent/index.js:22:15)
    at parsing (//------/node_modules/useragent/lib/update.js:39:11)
    at Object.generate (/------/node_modules/useragent/lib/update.js:214:3)
    at Object.parse (/------/node_modules/useragent/lib/update.js:174:11)
    at reading (/------/node_modules/useragent/lib/update.js:38:17)
    at /------/node_modules/async-listener/glue.js:188:31
    at tryToString (fs.js:499:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:487:12)

my node is v8.0.0

after rolling back to v2.1.13, it works

Senseye commented 7 years ago

index.js is missing variable declarations :(

jwarkentin commented 7 years ago

Yeah, this version is completely broken. Crashes my app the moment it starts due to the missing variable declaration. 6b84fdbd49ea20cb11ea3513ce69533f1164031d is the commit that broke it.

26medias commented 7 years ago

It's been 5 days. Will the author fix it?

3rd-Eden commented 7 years ago

Author is looking at various of options.

speedfirst commented 7 years ago

Wondering why this broken version can pass tests ?

3rd-Eden commented 7 years ago

There is no test for auto update because it depends on an external data source that doesn't always change making it impossible to create a test that always works when you run it.

3rd-Eden commented 7 years ago

Fixed in latest