R
Railway2y ago
Jack

Build failed - Error: error:0308010C:digital envelope routines::unsupported

Hi there, I cannot get past this error which I have been trying to fix for weeks now. I am running a rails 7 app here with node+webpack. It seems that its an issue with webpack causing this: https://github.com/webpack/webpack/issues/14532 I have tried updating webpack locally and setting the new versions in the package.json to try to skip this error, but nothing works. I am wondering how I can set something like 'export NODE_OPTIONS=--openssl-legacy-provider' in Railway? Here's the error output I am receiving upon deployment. output: Error: error:0308010C:digital envelope routines::unsupported
GitHub
nodejs 17: digital envelope routines::unsupported · Issue #14532 · ...
Bug report What is the current behavior? [webpack-cli] Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:67:19) at Object.createHash (node:crypto:1...
9 Replies
Percy
Percy2y ago
Project ID: 5a86d44d-3c28-4634-8940-766d17fcedea
Jack
JackOP2y ago
5a86d44d-3c28-4634-8940-766d17fcedea
angelo
angelo2y ago
Will take a look a bit later
Percy
Percy2y ago
Flagging this thread. A team member will be with you shortly.
root
root2y ago
You should be able to set NODE_OPTIONS to --openssl-legacy-provider in the Variables tab.
root
root2y ago
Or, you can downgrade to Node.js 16 using engines: https://docs.npmjs.com/cli/v6/configuring-npm/package-json#engines
package.json | npm Docs
Specifics of npm's package.json handling
root
root2y ago
E.g.:
"engines": {
"node": "16.x"
}
"engines": {
"node": "16.x"
}
(not a team member, just a person who's seen this issue before)
Jack
JackOP2y ago
Thanks for this. Tried all of the above, no luck sadly. In the end I removed Webpack.
Want results from more Discord servers?
Add your server