Gulp build failing on Sage 8.X legacy projects [SOLVED]

Just to let anyone with the same problem know this:

I got this error trying to gulp --production on legacy 8.X Sage sites:

/micromatch/index.js:44
    let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true);
                                                   ^^^
SyntaxError: Unexpected token ...

The solution is to stick browser-sync to 2.26.7. Change browser-sync version in package.json file and reinstall node_modules again.

8 Likes