-
Notifications
You must be signed in to change notification settings - Fork 79
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
[email protected]: Failed to find native module for linux-arm64 #472
Comments
I recently ran into this when trying out pact provider verification in an For me, it was So, maybe it's a missing system dependency? (i.e. something something |
You mentioned the issue is in docker, however the workshop doesn't use Docker. It would be ideal if you could please provide a simple reproducible setup that uses Docker. In your description you use the Message Pact interface (also not in the workshop), but presumably this bug will show up with just attempting to construct one of the Pact types. |
OK, so I reproduced it. index.js: const pact = require('@pact-foundation/pact')
const messagePact = new pact.MessageConsumerPact({
consumer: 'a.b-service-i',
provider: 'a.b-provider',
pactfileWriteMode: 'update',
logLevel: 'trace',
}) Running it in Docker as so:
The error above is reproduced. Once I shelled into the container and set
Following the advice, I've checked the shared library itself. Using
As per this issue, we should support back to 2.24, so I think something has changed in that build. I'm not sure if it's a possibility for you, but the Node 16 is currently EOL and it's not technically supported by us anymore, however if we are able to compile a native lib with a lower version it should resolve this. I'll leave it open to track that. |
With node 20 works fine |
Yep, 18 or later should do the trick |
Thanks for the report. we downgraded the version of cross which we are using to build the shared library which now means it is linking to glibc 2.23 Tested this on a mac m1 arm64 container as per Matt's steps above and it is now passing on a node 16 (and 14) image
|
Thanks Yousaf! |
I faced the same issue when trying to run a test with node version 20.11.1 and "@pact-foundation/pact": "12.1.3". @YOU54F Would also be possible to have a solution for node versions 20+? |
which distro are you running? its tested against node 20 in this repo and its consuming repo pact-js |
It is the distro alpine (node:20.11.1-alpine). This is the docker image: https://hub.docker.com/layers/library/node/20.11.1-alpine/images/sha256-f4c96a28c0b2d8981664e03f461c2677152cd9a756012ffa8e2c6727427c2bda?context=explore I also tested the image 20.11.1 which does not use alpine, and it works fine. So, it seems that the problem is specifically for the alpine distros. |
alpine is unsupported atm, use a glibc based distro
…On Wed, 28 Feb 2024 at 14:44, Fernando Teixeira ***@***.***> wrote:
It is the distro alpine (node:20.11.1-alpine).
This is the docker image:
https://hub.docker.com/layers/library/node/20.11.1-alpine/images/sha256-f4c96a28c0b2d8981664e03f461c2677152cd9a756012ffa8e2c6727427c2bda?context=explore
—
Reply to this email directly, view it on GitHub
<#472 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYCJ4KV3SFV7ISPYG3T2JDYV47FPAVCNFSM6AAAAABBQANK5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZGEZTQNJYGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
look for the open rfc issue for alpine in this repo |
Thanks for the info. It was only later that I realized that this was a specific alpine problem. Looking forward to this coming Alpine support 😃 |
I am getting the following error running inside a docker container on a mac m1.
[03:01:45.022] ERROR (361): [email protected]: Failed to find native module for linux-arm64: TypeError: Cannot read properties of undefined (reading 'pactffiInitWithLogLevel')
I can provide more info if necessary.
Software versions
v16.20.2
Issue Checklist
Please confirm the following:
Expected behaviour
Tests running
Actual behaviour
Test breaking trying to create
MessageConsumerPact
Steps to reproduce
Follow the pact-js-workshop tutorial on a mac m1.
Relevant log files
The text was updated successfully, but these errors were encountered: