Skip to content

Instantly share code, notes, and snippets.

@coreysyms
Created October 25, 2023 15:39
Show Gist options
  • Save coreysyms/8cce068150d1be3a1aa916dacaebe2d3 to your computer and use it in GitHub Desktop.
Save coreysyms/8cce068150d1be3a1aa916dacaebe2d3 to your computer and use it in GitHub Desktop.
AWS ElasticBeanstalk Nuxt.js OpenSSL 3 error
From https://medium.com/the-node-js-collection/node-js-17-is-here-8dba1e14e382
we can see this issue is due to Open SSL 3.0
From the article:
"If you hit an ERR_OSSL_EVP_UNSUPPORTED error in your application with Node.js 17, it’s likely that your application or a module you’re using is attempting to use an algorithm or key size which is no longer allowed by default with OpenSSL 3.0. A new command-line option, --openssl-legacy-provider, has been added to revert to the legacy provider as a temporary workaround for these tightened restrictions."
###To Fix###
Nuxt / Node 18 being deployed on AWS Elastic BeanStalk. I needed to create a predeploy hook with the flag to get it to run. package.json scripts update did not work for me. But the below method did.
.platform > hooks > predeploy > 01_build.sh
#!/bin/bash
export NODE_OPTIONS=--openssl-legacy-provider
npm run build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment