native-image-diff icon indicating copy to clipboard operation
native-image-diff copied to clipboard

Node 16 Support for OSX M1 arm64

Open tzjames opened this issue 4 years ago • 7 comments

I'm on an OSX M1. When running npm i native-image-diff I get:

npm ERR! Downloading native-image-diff prebuilt binary from "https://github.com/Prior99/native-image-diff/releases/download/0.1.14/native-image-diff-darwin-arm64-93.node".
npm ERR! Error: No supported native-image-diff 0.1.14 build found for node v16.1.0 on darwin (arm64).
npm ERR!     at Request.<anonymous> (/xxx/node_modules/native-image-diff/scripts/install.js:38:19)
npm ERR!     at Request.emit (node:events:365:28)
npm ERR!     at Request.onRequestResponse (/xxx/node_modules/request/request.js:1059:10)
npm ERR!     at ClientRequest.emit (node:events:365:28)
npm ERR!     at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:621:27)
npm ERR!     at HTTPParser.parserOnHeadersComplete (node:_http_common:127:17)
npm ERR!     at TLSSocket.socketOnData (node:_http_client:487:22)
npm ERR!     at TLSSocket.emit (node:events:365:28)
npm ERR!     at addChunk (node:internal/streams/readable:314:12)
npm ERR!     at readableAddChunk (node:internal/streams/readable:289:9)

Is there any work around?

tzjames avatar Jul 22 '21 08:07 tzjames

Sadly, no. There are no prebuilt binaries for that platform.

Prior99 avatar Jul 26 '21 07:07 Prior99

Still, any workarounds? Apple M1 becomes a very popular machine for development.

tfactor2 avatar Nov 06 '21 22:11 tfactor2

@Prior99 Could pixelmatch which uses pngjs an option?

Do you know more about these? What about speed? They do not use libpng. For me it seems that libpng is not maintained. A lot of PRs and issues over there. But no releases.

tujoworker avatar Nov 11 '21 08:11 tujoworker

@tfactor2 I am open for a PR adding some kind of CI support. @tujoworker pixelmatch and pngjs indeed do not use libpng, which makes them slow. This was the whole idea behind creating this library. There is nothing wrong with switching to them, but you'd sacrifice around 10 times the performance (See README).

I will not add support for a machine I do not own and use. Apple makes it notoriously complicated to compile stuff for their hardware. Sorry.

Prior99 avatar Nov 19 '21 08:11 Prior99

@Prior99 Any progress on this?

svenstaro avatar Feb 16 '22 11:02 svenstaro

@svenstaro I would be happy to accept a PR introducing some kind of CI support for this. I currently don't actively use this package and have no capacity to implement new features, especially if I don't have the hardware to test this.

Prior99 avatar May 10 '22 16:05 Prior99

@Prior99, could you point to a valid build pipeline, plz? https://travis-ci.org/Prior99/native-image-diff doesn't work for me.

tfactor2 avatar May 10 '23 14:05 tfactor2