ovhemert/gatsby-plugin-zopfli

Zopfli creates error when building

Closed this issue · 2 comments

Hi,
I have added the plugin as per instructions and started the gatsby build process. It produced the following error:


> Error: /home/ec2-user/environment/chefs/node_modules/gatsby-plugin-zopfli/gatsby-node.js:11
>       ...defaultOptions,
>       ^^^
>   SyntaxError: Unexpected token ...

Any thoughts? Did I miss something?
Thanks in advance.

It seems like you using an older version of Node.

The 3 dots is the spread operator, and was introduced in Node v8.6.0.
Please upgrade you environment to the latest Node version 8.x, or even better, upgrade to Node v10.x

The code of this module is tested against the latest Node versions 8.x and 10.x.

Let me know if that solved you issue.

Now it doesnt report any build errors. Thank you.