sindresorhus / globby

User-friendly glob matching
MIT License
2.53k stars 130 forks source link

Fix broken catch statement causing crashes #167

Closed fatlard1993 closed 3 years ago

fatlard1993 commented 3 years ago
node_modules/globby/index.js:28
    } catch {
            ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (node_modules/postcss-mixins/index.js:6:14)
jaichandra commented 3 years ago

can we fix the checks and do a release please. Our build is broken due to this issue.

papb commented 3 years ago

This package only supports Node.js 10 and up:

https://github.com/sindresorhus/globby/blob/master/package.json#L14

Are you using an older version?

jaichandra commented 3 years ago

Oh.. thats a problem then.. our jenkins is on node 9.11.2. Is there a way to make it work?

papb commented 3 years ago

For now, you could use your fork instead of the official release. To do this, you do the following:

I obtained the URL above by finding your last commit in this PR, https://github.com/sindresorhus/globby/commits/5eb9015c1166065115876ed7f4992f64727d7c1b, and then changing the /commits/ part of the URL to /tarball/ - GitHub provides this API feature that npm understands perfectly :)

However, I encourage you to update to Node.js 12 asap. Node.js no longer supports versions 8 and 9 for a long time... Not even security patches. Even Node.js 10 is almost dead - it will only receive security patches until April 2021. And ideally you should only use even versions of Node.js. Try to update do Node.js 12 asap.