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
Putting
ENV NODE_OPTIONS=--openssl-legacy-provider
in the Dockerfile for broken appsPutting
RUN export NODE_OPTIONS=--openssl-legacy-provider
in the Dockerfile for the broken appsPutting
RUN npm audit fix --force
within the Dockerfile for the broken appsChanging 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.