How to handle native binaries with Yarn on multiple platforms?

204 views Asked by At

I have a nodejs project with a few modules, one of them (appdynamics) serving a native binary depending on the platform/architecture of the requester. This in combination with the fingerprinting of yarn in the lockfile creates an issue:

  • on macOS, when developing, I have one native binary
  • on Linux, when deploying, I need another native binary

Yarn does not allow this out of the box because of the aforementioned fingerprinting.

For now the only workaround I've found is to mount the codebase into a Docker container and run yarn commands from there, then commit the lockfile changes.

Is there a better way to achieve this?

0

There are 0 answers