Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M1 chip incompatibility issues #3105

Closed
jahbolero opened this issue Feb 22, 2022 · 2 comments
Closed

M1 chip incompatibility issues #3105

jahbolero opened this issue Feb 22, 2022 · 2 comments
Labels

Comments

@jahbolero
Copy link

jahbolero commented Feb 22, 2022

Question about an existing feature

What are you trying to achieve?

Image composition using Macbook M1. Reopening another ticket as updating to the latest sharp version didn't resolve the issue #3091 and #2286 was through a different use case.

Windows Test Case
OS:Windows 10
Processor:AMD Ryzen 7 4000
Node Version:14.16.1
Total Runtime:9 Minutes

Macbook M1 Air
OS:Monterey
Processor:Apple M1
Node Version:15.6.0
Total Runtime:1 Hour, 15 Minutes

When you searched for similar issues, what did you find that might be related?

Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this question

const sharp = require('sharp');

const compositeImage = async (images, id) => {
  let inputArray = [];
  for (let i = 1; i < images.length; i++) {
    inputArray.push({ input: `${images[i]}` });
  }
  await sharp(`${images[0]}`).composite(inputArray).toFile(`output/${id}.png`);
};

(async () => {
  let imageArray = ['1.png', '2.png', '3.png', '4.png'];
  console.log('start:' + new Date().toLocaleTimeString());
  var i = 0;
  while (i < 1000) {
    await compositeImage(imageArray, i);
    i++;
  }
  console.log('end:' + new Date().toLocaleTimeString());
})();```

@lovell
Copy link
Owner

lovell commented Feb 22, 2022

Node.js 15.6.0 reached EOL in June last year and is unsupported. As far as I know, it was made available as x64 only so will use Rosetta emulation on an M1.

As I said in #3091, please see the not yet released #2286

@jahbolero
Copy link
Author

Works perfectly if using Node 17.6.0(Native to m1)

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants