I can't build my static nuxt 2 service

faber-smythe
FREE

a month ago

Hi everybody ! I'm new to Railway and still figuring stuff out, I've had some fun and some trouble.

So I'm trying to deploy a static Nuxt app through my github repository. I ran into this build issue "error:0308010C:digital envelope routines::unsupported".
It's quite documented, from what I gathered you usually fix it by adding "NODE_OPTIONS=--openssl-legacy-provider" which works locally but apparently Railway doesn't allow it.
Or you can fix it by downgrading node to v.16, and that also works locally but I can't find a way to force my railway build to use a specific node version.

Anyway, if you have any insights regarding that, I'll take it ! Thanks guys.

(I'm currently trying to get my entire portfolio back online, and I should already be able to share it, so I am a bit under time pressure)

$10 Bounty

4 Replies

You should still be able to set your node option, what's the issue with that?


faber-smythe
FREE

a month ago

I tried to set engines.node in my package.json, but I think it clashed with the package-lock.json. I cleaned it up and the correct node version is getting used now by the service, but it seems it's conflicting with dependency that requires v.18 or higher. It looks like a rabit hole so at this point I'll try to just upgrade my project to Nuxt 3 (it's a small repo) hoping that the error will be gone.


Under the variable tab of your project you should be able to set an environment variable of NODE_OPTIONS to --openssl-legacy-provider just fine


Also long term, might be ideal to upgrade your nuxt version


I can't build my static nuxt 2 service - Railway Help Station