question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build on M1

See original GitHub issue

When trying to build the website on an M1 MacBook it fails. For some reason, this does not appear to be the case for other contributors.

  • Node version: v18.12.1
  • npm version: 8.19.2
  • gulp-imagemin@8.0.0

When I run npm run build the following error occurs:

[23:17:04] TypeError in plugin "gulp-imagemin"
Message:
    function_ is not a function
Details:
    fileName: /Users/lars/Documents/GitHub/cwa-website/src/assets/img/App_Store_Badge_DE.svg
    domainEmitter: [object Object]
    domainThrown: false

When I run npm run dev the following error occurs:

[23:16:39] Error in plugin "gulp-webp"
Message:
    spawn Unknown system error -86
Details:
    errno: -86
    code: Unknown system error -86
    syscall: spawn
    fileName: /Users/lars/Documents/GitHub/cwa-website/src/assets/img/app-mockup.png
    domainEmitter: [object Object]
    domainThrown: false

As discovered by @MikeMcC399 in https://github.com/corona-warn-app/cwa-website/issues/3100#issuecomment-1305831728, I’m not the only one who has encountered this issue so far. The TypeError for gulp-imagemin was already reported in its repository at https://github.com/sindresorhus/gulp-imagemin/issues/373.

If anyone is able to reproduce this, feel free to comment below. It is of great interest for us to make this project work on M1 devices.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
MikeMcC399commented, Nov 9, 2022

@larswmh

It looks like using Rosetta 2 is the only available workaround at this time. Deep down in the npm dependencies there are some binaries called up and for instance there is an old version of cwebp-bin (5.1.0) being used (latest is 8.0.0).

The version of gulp-webp (4.0.1) is the latest, although it is 4 years old. This is using imagemin-webp 5.1.0 released 3 years ago, and the current version is 7.0.0.

The latest gulp version (4.0.2) itself is also 4 years old, so it seems we have to work around whatever shortcomings are surfacing. I don’t expect much gulp update activity to occur. I guess a new project would prefer other tool / framework options?

2reactions
larswmhcommented, Nov 8, 2022

@MikeMcC399 @Ein-Tim

You didn’t mention which version of macOS you are using. I don’t know if that makes any difference.

It’s the latest version 13.0 (22A380).

Anyway, thank you both for your extensive help on this issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't build to simulator on Apple Silicon
It only popped up when trying to build on my new M1 MacBook Air and Xcode 12. I've tried everything that's been reported...
Read more >
Build failing m1 Mac - Using Swift
Build failing m1 Mac ... absolutely unable to find the root of this bug. ... What was working for me (usually happened with...
Read more >
I can't seem to build the project using an M1 MacBook Pro
Paging @sergiou87 who's the only one on our team who currently builds Desktop on an M1 but some quick Googling suggests that maybe...
Read more >
How to Solve React Native (IOS) Build Failed on Apple M1 Pro ...
The solution to solve React Native build failure on M1 Macbook is to use Rosetta. What is a rosetta? Rosetta is a dynamic...
Read more >
I can't build my app with apple silicon m1 pro without using ...
Open context menu -> change the settings of the Simulator.app in the information like you did for Xcode: Set checkmark for Open with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found