not compatible with node 8
Closed this issue · 5 comments
I tried to update from v5.0.15 to 5.0.21, but it doesn't work since my project is using node 8.x and a dependency requires node 10.x
error fast-unique-numbers@4.0.4: The engine "node" is incompatible with this module. Expected version ">=10.15.3". Got "8.16.0"
Hi @jgarces-tw,
unfortunately this library doesn't work with Node.js. It is meant to circumvent the timer throttling which happens in some browsers by using a WebWorker.
As far as I know Node.js doesn't do such a throttling which is why using this library with Node.js is not necessary. Since this library is using a WebWorker which isn't available in Node.js it will most likely throw an error as well.
Can you please explain me your use case and tell me a bit why you want to use this library with Node.js? Maybe there is some use case which I'm not aware of yet.
Hi, I don't actually use it with node really, but with the browser like you say.
Sadly some of my other dependencies require node 8 to build (for some reason :( ) and that's why I have to keep using node 8.
Btw, I just noticed fast-unique-numbers is a library made by you too. If in theory it is not tied to a particular node runtime (since it is meant to run in the browser), shouldn't it remove the node engine version dependency from its package json? (that should fix the yarn install error too)
Hi,
fast-unique-numbers can be used with Node.js and in the browser. It doesn't have any particular runtime dependency. I do usually automatically bump the required engine when there is new LTS version of Node.js. From that point onwards I do only run the tests for the new version to make my life a little easier. However the last time that happened I didn't actually change something.
I think the engines property is only a problem when installing worker-timers. Since you never run the package with Node.js you can probably ignore it by using the --ignore-engines
command line flag.
Please let me know if that works.
Hi @jgarces-tw, I'm closing the issue now since it is inactive now for about a month. I imagine you found a way to work around the error. Let me know if that assumption was too optimistic.
Yeah sorry, just updated to node 10 :)