I can't build my static nuxt 2 service
faber-smythe
FREEOP

9 months 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)

Solved$10 Bounty

Pinned Solution

9 months ago

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

4 Replies

9 months ago

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


faber-smythe
FREEOP

9 months 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.


9 months ago

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


9 months ago

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


Status changed to Solved noahd 6 months ago


Loading...