Closed luchillo17 closed 6 years ago
Yes, please. Having the same issue when using browserslist-useragent
.
I didn't wanted to mention the library itself, but is Device
.
You can just manually do npm install yamlparser useragent
as npm flattens the node_modules
tree, the useragent
module will find the yamlparser
you manually installed and use that instead. I don't want to bundle it as part of the dependencies as it's optional functionality.
@3rd-Eden bro, if it's optional why do the mentioned libs break? are you suggesting those libs should know it's optional and they should be in charge of installing those deps?
Yo bro, I have no idea why it breaks. The only part of this library that uses yamlparser
is when you call the useragent(true)
update API, which mentions that you need to manually install those dependencies in order for that to work.
The browserslist-useragent library does not invoke this, nor does the device parser of this library use yamlparser.
Maybe it's incompatibility with transpilers, i'm using it inside TypeScript, how's supposed to know that the yaml dep is optional if the optional part is decided at runtime?
Anyway i moved away from Device, so it depends on @manuelbieh if he explains his case better.
There's a bug where a library that uses this dep fails because it doesn't install the dev deps, this is to move the
yamlparser
dep into the correct section inpackage.json
.