imageminZopfli: SyntaxError: Unexpected identifier #8784

Closed
opened 2025-11-02 08:17:47 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @saegl5 on GitHub (Apr 4, 2022).

Description

make generate-images fails

./gitea/build/generate-images.js:1
import imageminZopfli from 'imagemin-zopfli';
     ^^^^^^^^^^^^^^

SyntaxError: Unexpected identifier

Node.js version: 10.19.0
npm version: 6.14.4

Gitea Version

1.16.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Ubuntu 20.04.4 LTS (GNU/Linux 5.13.0-1023-gcp x86_64)

How are you running Gitea?

Hello, I SSHed into a Google Cloud instance (see operating system above).
I cloned Gitea's GitHub source repository using commit 256204befa.

Database

SQLite

Originally created by @saegl5 on GitHub (Apr 4, 2022). ### Description `make generate-images` fails .`/gitea/build/generate-images.js:1` `import imageminZopfli from 'imagemin-zopfli';`      `^^^^^^^^^^^^^^` `SyntaxError: Unexpected identifier` Node.js version: 10.19.0 npm version: 6.14.4 ### Gitea Version 1.16.5 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System Ubuntu 20.04.4 LTS (GNU/Linux 5.13.0-1023-gcp x86_64) ### How are you running Gitea? Hello, I SSHed into a Google Cloud instance (see operating system above). I cloned Gitea's GitHub source repository using commit 256204befaba203b9cf081a5d479a9932ad4b171. ### Database SQLite
GiteaMirror added the issue/needs-feedback label 2025-11-02 08:17:47 -06:00
Author
Owner

@saegl5 commented on GitHub (Apr 4, 2022):

For more information, see this attachment: terminal_output.txt

(attachment includes my full terminal output)

@saegl5 commented on GitHub (Apr 4, 2022): For more information, see this attachment: [terminal_output.txt](https://github.com/go-gitea/gitea/files/8406960/terminal_output.txt) (attachment includes my full terminal output)
Author
Owner

@techknowlogick commented on GitHub (Apr 5, 2022):

The min node version is 12.17, are you able to update to at least that? (tbh, with looming eol we should probably update the minimum to something more recent anyway)

@techknowlogick commented on GitHub (Apr 5, 2022): The min node version is `12.17`, are you able to update to at least that? (tbh, with looming eol we should probably update the minimum to something more recent anyway)
Author
Owner

@silverwind commented on GitHub (Apr 5, 2022):

Node v10 is unsupported (both by us and by the node maintainers), you definitely need 12.17.0 or higher.

BTW, Ubuntu 22.04 LTS is around the corner which should bring a supported version of Node again.

@silverwind commented on GitHub (Apr 5, 2022): Node v10 is unsupported (both by us and by the node maintainers), you definitely need 12.17.0 or higher. BTW, Ubuntu 22.04 LTS is around the corner which should bring a supported version of Node again.
Author
Owner

@saegl5 commented on GitHub (Apr 5, 2022):

@techknowlogick and @silverwind thank you both

confirmed
make generate-images works for, for example, Node.js version 16.14.2

I removed the version of Node.js and npm packaged with Ubuntu 22.04 LTS
Then, I installed Node.js LTS with npm from NodeSource

By the way, I appreciate the nifty script(s) you made to generate the images from an svg.
Neat!

@saegl5 commented on GitHub (Apr 5, 2022): @techknowlogick and @silverwind thank you both confirmed `make generate-images` works for, for example, Node.js version 16.14.2 I removed the version of Node.js and npm packaged with Ubuntu 22.04 LTS Then, I installed Node.js LTS with npm from [NodeSource](https://github.com/nodesource/distributions/blob/master/README.md) By the way, I appreciate the nifty script(s) you made to generate the images from an svg. Neat!
Author
Owner

@silverwind commented on GitHub (Apr 5, 2022):

Checked latest Ubuntu 22.04, it has Node.js v12.22.9 in the base repo, which is barely enough to be supported. Makes one really wonder why they keep such ancient versions when other tools like PHP or OpenSSL are kept much more recent.

@silverwind commented on GitHub (Apr 5, 2022): Checked latest Ubuntu 22.04, it has Node.js v12.22.9 in the base repo, which is barely enough to be supported. Makes one really wonder why they keep such ancient versions when other tools like PHP or OpenSSL are kept much more recent.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8784