sindresorhus / p-limit

Run multiple promise-returning & async functions with limited concurrency
MIT License
1.84k stars 99 forks source link

Increase required nodejs version to 10.3 or get rid of Optional Catch Binding #38

Closed SkaceKamen closed 3 years ago

SkaceKamen commented 3 years ago

This line causes crash on nodejs < 10.3: https://github.com/sindresorhus/p-limit/blob/b702cc1aa737ae834b4deaf87a537812d8d5418f/index.js#L30

This is "Optional Catch Binding" and is only supported in nodejs version 10.3 and higher, see https://node.green/#ES2019-misc-optional-catch-binding

SkaceKamen commented 3 years ago

Sorry, seems like the issue was that we were running incorrect nodejs version, but still passed the node >= 10 check :\