TypeError: ua_parser_js_1.default is not a constructor
th3f0r3ign3r opened this issue · comments
Tthe bug
I just trying to parse the userAgent of users calling an API based on NestJS and after creating an instance of UAParser and the userAgent i get this error when calling the function TypeError: ua_parser_js_1.default is not a constructor
After installing nestjs
OS: MacOs 13.5.2
UAParser
is exposed as a named export rather than a default, maybe you miss the {}
?
import { UAParser } from 'ua-parser-js'
UAParser
is exposed as a named export rather than a default, maybe you miss the{}
?import { UAParser } from 'ua-parser-js'
OK let me try !🤞🏾
UAParser
is exposed as a named export rather than a default, maybe you miss the{}
?import { UAParser } from 'ua-parser-js'
Thanks it work !!