R
Railway7mo ago
Harris

Prisma cannot find the required `libssl` system library in your system. Please install openssl-3.0.x

Getting a new error on my deployments that I've not seen before
No description
104 Replies
Percy
Percy7mo ago
Project ID: f0b123dd-49d4-4bfc-b063-9a5238f876ef
Harris
Harris7mo ago
Railway
404 - Page not found
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
Harris
Harris7mo ago
Confused because this didn't used to happen thinkies
Cryogenic
Cryogenic7mo ago
Same error using it with bun, looks like a few others have had this error too - doesn't seem to have a great solve
Harris
Harris7mo ago
dang, i was deploying fine a few days ago, what changed? I tried the various solutions in the different related threads (adding openssl to nixlibs), symlinking files, adding node,etc, no luck I think my next step is to create a Dockerfile specifically? Although am gonna need to learn how to do this for my monorepo (turborepo) using npm running bun
ethan
ethan7mo ago
i am in a very very similar boat, however with pnpm instead of npm. i have a turborepo with one 'project' using bun, and i got that working before but now prisma is giving me the exact same error
Harris
Harris7mo ago
same setup on my end, i have a turborepo, with one of my apps being a websocket server with bun the other being a nextjs application i use npm as package manager because bun doesn't fully support monorepos yet and only recently had this issue before
The Big E in Math -> Σ
Though I haven't encounter this issue yet, you should be able to temporary fix this by running the service via Dockerfile.
Harris
Harris7mo ago
currently figuring out how to make one I've used dockerfiles before but the part I'm trying to figure out here is how to best handle turborepo's filtering that's recommended
Harris
Harris7mo ago
No description
Harris
Harris7mo ago
also if I need npm to install, but need bun to run, what's the best image to work off here and also I think i'll need to make a dockerfile for this app specifically and adjust where railway is point to so it gets the right one
The Big E in Math -> Σ
tbh, I never use turbo so I can't give you any feedback on that, but if possible, use the the alpine image. I was able to reduce my memory usage from 200 to around 70.
Harris
Harris7mo ago
alpine image of node? oh alpine linux
Harris
Harris7mo ago
alpine - Official Image | Docker Hub
A minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size!
Harris
Harris7mo ago
?
The Big E in Math -> Σ
ye, the reducing will vary, but should be less than if you use nix.
Harris
Harris7mo ago
awesome, ty
ethan
ethan7mo ago
@Harris please let me know if you find a dockerfile that works
jr
jr7mo ago
When did this start happening?
Harris
Harris7mo ago
Previously I had it working on the 13th for sure https://discord.com/channels/713503345364697088/1173859037612343368/1173871855631859712 I don’t know what changed but I only noticed it 2-3 days ago
ethan
ethan7mo ago
couple days ago
jr
jr7mo ago
What version of prisma are you using? Can you trying adding a railway.toml file with the contents
[build]
nixpacksVersion = "1.17.0"
[build]
nixpacksVersion = "1.17.0"
ethan
ethan7mo ago
5.5.2
[phases.setup]
nixpkgsArchive = '231b230513b81db80821be631f2e395e26a21f16'
nixPkgs = ['...', 'bun']

[start]
cmd = 'pnpm run api:start'
[phases.setup]
nixpkgsArchive = '231b230513b81db80821be631f2e395e26a21f16'
nixPkgs = ['...', 'bun']

[start]
cmd = 'pnpm run api:start'
my current nixpacks.toml should i make a railway.toml to go along with it?
jr
jr7mo ago
We can try a few things to debug what is happening. First, can you try removing the [phases.setup] section
ethan
ethan7mo ago
sure
jr
jr7mo ago
I'm trying to reproduce using the latest version of prisma but am unable to. So I beleive it is a config error
ethan
ethan7mo ago
i am on bun as well building 👍
jr
jr7mo ago
Can you please share the link
ethan
ethan7mo ago
Railway
404 - Page not found
Railway is an infrastructure platform where you can provision infrastructure, develop with that infrastructure locally, and then deploy to the cloud.
ethan
ethan7mo ago
error because bun cant be found
jr
jr7mo ago
oh right, you can add that section back. But not the archive bit
ethan
ethan7mo ago
ok building Prisma cannot find the required 'libssl' system library in your system. Please install openssl-3.0.x and try again. (same issue as before)
jr
jr7mo ago
yup interesting. Trying to reproduce with the same settings locally. In the meantime can you try this https://canary.discord.com/channels/713503345364697088/1175401667978604575/1176271639961419876
ethan
ethan7mo ago
building weirdly this time it tried to build prisma from the root and failed
jr
jr7mo ago
that looks to have worked?
ethan
ethan7mo ago
yes give me a second im testing something yup working thanks!!
jr
jr7mo ago
cool. np! I'll take a look at why it is failing with the latest version
L4TRIO
L4TRIO7mo ago
Hello friends, I am running into the same error. I've noticed since a few days
No description
L4TRIO
L4TRIO7mo ago
Also using bun and prisma 5.5.0, I had updated to 5.6.0 which was released a week ago and then I reverted back because I thought that this might be a Prisma error, but it's still hapenning on Prisma 5.5.0
jr
jr7mo ago
ah I think the issue is with node 21 which is now added to nixpacks. I recommend specifying the node version you would like in the package.json file.
{
"engines": { "node": "18.x" }
}
{
"engines": { "node": "18.x" }
}
If your specified version is something like > 18 then the latest version will be used
L4TRIO
L4TRIO7mo ago
I tried this and it seems to have fixed it: https://discord.com/channels/713503345364697088/1175401667978604575/1176271639961419876 I believe it has also to do with the new node js version and the culprit does indeed seem to be nixpacks, because that's the only thing that probably changed in the last few days. I did not change anything in the codebase Thanks a lot!
Harris
Harris7mo ago
oh wait, what was the change? Ah ok, so adding a railway.tomml to specify a nixpacks version fixes it?
Harris
Harris7mo ago
Which solution is preferred? @L4TRIO suggests that it was fixed by specifying 1.17 for nixpack in the railway.toml as mentioned above, but is the node engine specification a better solution, or are both needed? Does nixpacks adhear to the engine version in the package.json?
Brody
Brody7mo ago
the solution jr proposed is a far better solution than pinning your nixpacks version
Harris
Harris7mo ago
makes sense, will go ahead and try this this saves me the time of trying to make a docker file to handle this weird case so ty ❤️
Harris
Harris7mo ago
No description
Harris
Harris7mo ago
just to clarify (i'm still learning js ecosystem stuff) is this engines field only used by npm?
ethan
ethan7mo ago
setting my node engine to 18.x did not work
Brody
Brody7mo ago
though I'd just simply put 18, not too sure why jr put 18.x
ethan
ethan7mo ago
had to go back to the nixpacks version pinning
Brody
Brody7mo ago
when you set your engines.node to 18, can you confirm that the build did in fact use node 18? this would be printed in the build logs at the top in the build table
ethan
ethan7mo ago
yup can confirm
Harris
Harris7mo ago
No description
Harris
Harris7mo ago
currently building, will see result publishing image
Harris
Harris7mo ago
No description
Harris
Harris7mo ago
that seems to have worked for me
ethan
ethan7mo ago
weird - only i thing i changed was removing the railway.toml file and pinning the version
Harris
Harris7mo ago
I don't have a railway.toml only the nixpacks.toml previously the prisma error would only appear on server start, so I think it's gone on my end?
Brody
Brody7mo ago
awesome, I see you have openssl in the setup, crscd, do you have openssl listed there?
Harris
Harris7mo ago
[phases.setup]
nixpkgsArchive = '231b230513b81db80821be631f2e395e26a21f16' # https://github.com/NixOS/nixpkgs/commit/231b230513b81db80821be631f2e395e26a21f16
nixPkgs = ['...', 'bun']
nixLibs = ['...', 'openssl']
[phases.setup]
nixpkgsArchive = '231b230513b81db80821be631f2e395e26a21f16' # https://github.com/NixOS/nixpkgs/commit/231b230513b81db80821be631f2e395e26a21f16
nixPkgs = ['...', 'bun']
nixLibs = ['...', 'openssl']
this is my nixpacks.toml
ethan
ethan7mo ago
No description
ethan
ethan7mo ago
i was told to remove the archive line
Brody
Brody7mo ago
nixLibs under the start phase is not valid syntax and won't do anything, otherwise you're good
ethan
ethan7mo ago
my nixpacks.toml
[phases.setup]
nixPkgs = ['...', 'bun']

[start]
cmd = 'pnpm run api:start'
[phases.setup]
nixPkgs = ['...', 'bun']

[start]
cmd = 'pnpm run api:start'
Harris
Harris7mo ago
ah good to know perhaps try adding nixLibs openssl?
Brody
Brody7mo ago
can you add openssl as nixLibs under the setup phase like in the nixpacks.toml Harris shows? haha exactly my thoughts
Harris
Harris7mo ago
@Brody do you if there would be a way to have the latest bun version for the nixarchive? I think there's a bot that always pushes that latest version to docker images, but could there be something similar for nixarchives?
ethan
ethan7mo ago
building
Harris
Harris7mo ago
cause I think the archive is 1.0.11 but bun canary is .13
ethan
ethan7mo ago
i think its because your archive is pinned? try removing that line
Harris
Harris7mo ago
oh do I not need to specify it?
Brody
Brody7mo ago
it would then default to a much older version
ethan
ethan7mo ago
oh really?
Brody
Brody7mo ago
yes, since internally nixpacks has a nixarchive that it will use by default you are right, bun is version 1.0.13 right now, but nixpacks only has 1.0.12 https://github.com/NixOS/nixpkgs/commits/master/pkgs/development/web/bun/default.nix the archive to use for 1.0.12 is f53263caceb5f2a92eb2269e8eed9ef7a065fb7a (its just the commit id) https://github.com/NixOS/nixpkgs/commit/f53263caceb5f2a92eb2269e8eed9ef7a065fb7a
Harris
Harris7mo ago
github action to run updateScript = writeShellScript "update-bun" '' on new bun commit 👀 ?
Brody
Brody7mo ago
this pr just needs to be merged and then nixpacks will have bun 1.0.13 https://github.com/NixOS/nixpkgs/pull/268524 once thats done you can grab the commit id in the same way i showed above
ethan
ethan7mo ago
working!!
Brody
Brody7mo ago
awsome @jr adding openssl in nixLibs worked to fix this issue, perhaps auto adding openssl as a nixlib if the build uses bun?
jr
jr7mo ago
yup good idea. It was likely this PR that broke things https://github.com/railwayapp/nixpacks/pull/986 great to know that adding it in this case fixed it. We can def add when using bun
Brody
Brody7mo ago
thats for sure what broke it 🤣 time to add another test case!
Harris
Harris7mo ago
kind of curious, what caused it to go 3 weeks unnoticed? cause oct 16 -> nov 16th roughly ohhh wait was it this + the node 20 change? causing it to trigger a few days ago
jr
jr7mo ago
The PR was merged a few weeks ago, but nixpacks on Railway was only recently updated
Brody
Brody7mo ago
yep github release does not always mean railway will use the latest release
Harris
Harris7mo ago
phrased it weird, but just trying to learn 🙂 Nixpacks was developed by Railway, right?
Brody
Brody7mo ago
why delete, that was a good question.
Brody
Brody7mo ago
yes nixpacks was developed by railway, some other platforms use it too, but maybe most notably, hop.io uses it
No description
Harris
Harris7mo ago
forgot the exact wording of it now lol, but how big is Nixpacks outside of Railway? is it used by a ton of folks and so therefore it has a bit of a slower adoption by railway? kind of seperation of concerns almost
Brody
Brody7mo ago
yep developed by railway, used by others, dont know why railway doesnt use the latest version automatically
ethan
ethan7mo ago
i wish railway let you deploy stuff on your own aws/gcp - would make my life a lot cheaper haha
Brody
Brody7mo ago
they will at one point, though it would likely be limited to enterprise customers
ethan
ethan7mo ago
aw
Brody
Brody7mo ago
that's what PipeOps is for though
ethan
ethan7mo ago
yeah im aware of the several alternatives however none are as nice to use as railway
Brody
Brody7mo ago
so true
ethan
ethan7mo ago
flightcontrol, easypanel, pipeops (just the ones that use nixpacks) all feel janky in one way or another
Brody
Brody7mo ago
I agree, but you didn't hear me say that
ethan
ethan7mo ago
coolify especially i really want to love coolify but it’s just not there yet hop is pretty good but i want to use my aws credits
Brody
Brody7mo ago
I getcha
ethan
ethan7mo ago
my struggles the firstest of worlds
Brody
Brody7mo ago
either way, happy this is fixed for the both of you!
ethan
ethan7mo ago
thank you!
L4TRIO
L4TRIO7mo ago
For me the error happened anywhere I invoked Prisma to add/modify data in the database