0

I have an Elixir project running Alpine Linux 3.16 and a few of the apps within the project depend on Node. I'm getting error messages through AWS CodeBuild that

error:0308010C:digital envelope routines::unsupported

So far I've found a number of threads on this issue including this one: Error message "error:0308010C:digital envelope routines::unsupported"

It appears like I need to set Node options to use this flag --openssl-legacy-provider

I have tried the following solutions so far without success

  1. Putting ENV NODE_OPTIONS=--openssl-legacy-provider in the Dockerfile for broken apps

  2. Putting RUN export NODE_OPTIONS=--openssl-legacy-provider in the Dockerfile for the broken apps

  3. Putting RUN npm audit fix --force within the Dockerfile for the broken apps

  4. Changing the package.json in the apps to use "scripts": { "deploy": "webpack --mode production --openssl-legacy-provider", "watch": "webpack --mode development --watch" }

So far none of these have worked and I'm looking for any solution to get around this issue.

William Ross
  • 3,568
  • 7
  • 42
  • 73

1 Answers1

0

Was able to get it working now by placing

ENV NODE_OPTIONS=--openssl-legacy-provider

at a later stage in the Dockerfile and also upgrading Alpine to 3.17

There's an active thread detailing this issue further: https://github.com/erlang/docker-erlang-otp/issues/428

William Ross
  • 3,568
  • 7
  • 42
  • 73