R
Railway13mo 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
Percy13mo ago
Project ID: f0b123dd-49d4-4bfc-b063-9a5238f876ef
Harris
HarrisOP13mo 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
HarrisOP13mo ago
Confused because this didn't used to happen thinkies
Cryogenic
Cryogenic13mo 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
HarrisOP13mo 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
ethan13mo 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
HarrisOP13mo 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
HarrisOP13mo 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
HarrisOP13mo ago
No description
Harris
HarrisOP13mo 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
HarrisOP13mo ago
alpine image of node? oh alpine linux
Harris
HarrisOP13mo 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
HarrisOP13mo ago
?
The Big E in Math -> Σ
ye, the reducing will vary, but should be less than if you use nix.
Harris
HarrisOP13mo ago
awesome, ty
ethan
ethan13mo ago
@Harris please let me know if you find a dockerfile that works
jr
jr13mo ago
When did this start happening?
Harris
HarrisOP13mo 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
ethan13mo ago
couple days ago
jr
jr13mo 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
ethan13mo 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
jr13mo ago
We can try a few things to debug what is happening. First, can you try removing the [phases.setup] section
ethan
ethan13mo ago
sure
jr
jr13mo 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
ethan13mo ago
i am on bun as well building 👍
jr
jr13mo ago
Can you please share the link
ethan
ethan13mo 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
ethan13mo ago
error because bun cant be found
jr
jr13mo ago
oh right, you can add that section back. But not the archive bit
ethan
ethan13mo 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
jr13mo 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
ethan13mo ago
building weirdly this time it tried to build prisma from the root and failed
jr
jr13mo ago
that looks to have worked?
ethan
ethan13mo ago
yes give me a second im testing something yup working thanks!!
jr
jr13mo ago
cool. np! I'll take a look at why it is failing with the latest version
L4TRIO
L4TRIO13mo ago
Hello friends, I am running into the same error. I've noticed since a few days
No description
L4TRIO
L4TRIO13mo 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
jr13mo 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
L4TRIO13mo 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
HarrisOP13mo ago
oh wait, what was the change? Ah ok, so adding a railway.tomml to specify a nixpacks version fixes it?
Harris
HarrisOP13mo 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
Brody13mo ago
the solution jr proposed is a far better solution than pinning your nixpacks version
Harris
HarrisOP13mo 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
HarrisOP13mo ago
No description
Harris
HarrisOP13mo ago
just to clarify (i'm still learning js ecosystem stuff) is this engines field only used by npm?
ethan
ethan13mo ago
setting my node engine to 18.x did not work
Brody
Brody13mo ago
though I'd just simply put 18, not too sure why jr put 18.x
ethan
ethan13mo ago
had to go back to the nixpacks version pinning
Brody
Brody13mo 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
ethan13mo ago
yup can confirm
Harris
HarrisOP13mo ago
No description
Harris
HarrisOP13mo ago
currently building, will see result publishing image
Harris
HarrisOP13mo ago
No description
Harris
HarrisOP13mo ago
that seems to have worked for me
ethan
ethan13mo ago
weird - only i thing i changed was removing the railway.toml file and pinning the version
Harris
HarrisOP13mo 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
Brody13mo ago
awesome, I see you have openssl in the setup, crscd, do you have openssl listed there?
Harris
HarrisOP13mo 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
ethan13mo ago
No description
ethan
ethan13mo ago
i was told to remove the archive line
Brody
Brody13mo ago
nixLibs under the start phase is not valid syntax and won't do anything, otherwise you're good
ethan
ethan13mo 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
HarrisOP13mo ago
ah good to know perhaps try adding nixLibs openssl?
Brody
Brody13mo ago
can you add openssl as nixLibs under the setup phase like in the nixpacks.toml Harris shows? haha exactly my thoughts
Harris
HarrisOP13mo 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
ethan13mo ago
building
Harris
HarrisOP13mo ago
cause I think the archive is 1.0.11 but bun canary is .13
ethan
ethan13mo ago
i think its because your archive is pinned? try removing that line
Harris
HarrisOP13mo ago
oh do I not need to specify it?
Brody
Brody13mo ago
it would then default to a much older version
ethan
ethan13mo ago
oh really?
Brody
Brody13mo 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
HarrisOP13mo ago
github action to run updateScript = writeShellScript "update-bun" '' on new bun commit 👀 ?
Brody
Brody13mo 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
ethan13mo ago
working!!
Brody
Brody13mo 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
jr13mo 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
Brody13mo ago
thats for sure what broke it 🤣 time to add another test case!
Harris
HarrisOP13mo 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
jr13mo ago
The PR was merged a few weeks ago, but nixpacks on Railway was only recently updated
Brody
Brody13mo ago
yep github release does not always mean railway will use the latest release
Harris
HarrisOP13mo ago
phrased it weird, but just trying to learn 🙂 Nixpacks was developed by Railway, right?
Brody
Brody13mo ago
why delete, that was a good question.
Brody
Brody13mo ago
yes nixpacks was developed by railway, some other platforms use it too, but maybe most notably, hop.io uses it
No description
Harris
HarrisOP13mo 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
Brody13mo ago
yep developed by railway, used by others, dont know why railway doesnt use the latest version automatically
ethan
ethan13mo ago
i wish railway let you deploy stuff on your own aws/gcp - would make my life a lot cheaper haha
Brody
Brody13mo ago
they will at one point, though it would likely be limited to enterprise customers
ethan
ethan13mo ago
aw
Brody
Brody13mo ago
that's what PipeOps is for though
ethan
ethan13mo ago
yeah im aware of the several alternatives however none are as nice to use as railway
Brody
Brody13mo ago
so true
ethan
ethan13mo ago
flightcontrol, easypanel, pipeops (just the ones that use nixpacks) all feel janky in one way or another
Brody
Brody13mo ago
I agree, but you didn't hear me say that
ethan
ethan13mo 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
Brody13mo ago
I getcha
ethan
ethan13mo ago
my struggles the firstest of worlds
Brody
Brody13mo ago
either way, happy this is fixed for the both of you!
ethan
ethan13mo ago
thank you!
L4TRIO
L4TRIO13mo ago
For me the error happened anywhere I invoked Prisma to add/modify data in the database
Want results from more Discord servers?
Add your server