sindresorhus / globby

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

SyntaxError: Unexpected token { #169

Closed Aymkdn closed 3 years ago

Aymkdn commented 3 years ago

There is a missing argument to the catch at https://github.com/sindresorhus/globby/blob/main/index.js#L28

When I run nexe or pkg, both of them returns the same error due to globby:

SyntaxError: Unexpected token {

I'm using Node v9.9.0, and it needs to be fixed with the below:

    try {
        stat = fs.statSync(options.cwd);
    } catch(e) {
        return;
    }
sindresorhus commented 3 years ago

You need to upgrade your Node.js version.

SnehaParanjape-orange commented 1 year ago

I'm using node 16.13.0 and npm 8.1.0 and still seeing this error

which version of globby should i use?