sindresorhus / ow

Function argument validation for humans
https://sindresorhus.com/ow/
MIT License
3.8k stars 105 forks source link

Package does not seem to work on node v8 `SyntaxError: Unexpected token {` #223

Closed Gerben-T closed 2 years ago

Gerben-T commented 2 years ago

I get the following error after installing "ow": "0.27.0" with node v8.10.0 and npm 6.14.15

/usr/src/app/node_modules/ow/dist/index.js:41
2021-09-23T09:29:09.511676800Z             catch {
2021-09-23T09:29:09.511679700Z                   ^
2021-09-23T09:29:09.511681900Z 
2021-09-23T09:29:09.511684400Z SyntaxError: Unexpected token {
2021-09-23T09:29:09.511686400Z     at createScript (vm.js:80:10)
2021-09-23T09:29:09.511688500Z     at Object.runInThisContext (vm.js:139:10)
2021-09-23T09:29:09.511690500Z     at Module._compile (module.js:617:28)
2021-09-23T09:29:09.511692500Z     at Object.Module._extensions..js (module.js:664:10)
2021-09-23T09:29:09.511694400Z     at Module.load (module.js:566:32)
2021-09-23T09:29:09.511696400Z     at tryModuleLoad (module.js:506:12)
2021-09-23T09:29:09.511698300Z     at Function.Module._load (module.js:498:3)
2021-09-23T09:29:09.511700300Z     at Module.require (module.js:597:17)
2021-09-23T09:29:09.511702300Z     at require (internal/module.js:11:18)
2021-09-23T09:29:09.511704200Z     at Object.<anonymous> (/usr/src/app/src/namespaces/typing/events/register.js:1:85)

I this package officially supported for v8, because node v8 is a hard requirement for my project..

sindresorhus commented 2 years ago

https://github.com/sindresorhus/ow/blob/3384c4eb1b9093a5efc0ea8ad7077e0e4a21f3b8/package.json#L16-L18