OpenSSL error while running prisma generate command

Hey! I'm facing an OpenSSL error when prisma generate command is ran.
Error: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
Error: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
I have tried installing openssl package via the aptPkgs field in nixpacks config but it didn't work
53 Replies
Percy
Percy2y ago
Project ID: N/A
Percy
Percy2y ago
⚠️ experimental feature
milo
milo2y ago
anguish
[phases.setup]
nixPkgs = ["...", "openssl", "openssl.dev"]
[phases.setup]
nixPkgs = ["...", "openssl", "openssl.dev"]
chuck that in nixpacks.toml
Mukesh
Mukesh2y ago
lemme try
Mukesh
Mukesh2y ago
Mukesh
Mukesh2y ago
rip welp that didn't work
Finn
Finn2y ago
an again. he will see it try using nixAptPkgs instead
Mukesh
Mukesh2y ago
doesn't work anguish
Finn
Finn2y ago
whats the error
Mukesh
Mukesh2y ago
the packages get installed but the openssl error shows up :/
milo
milo2y ago
I hate OpenSSL Can you make a repo for this
Finn
Finn2y ago
fucking agreeable
Mukesh
Mukesh2y ago
uh, I can't share the repository. it is an express.js application and prisma was working fine ~3 hours ago.
Finn
Finn2y ago
try setting NIXPACKS_DEBIAN=1
milo
milo2y ago
rustls where it at 💯💯
Finn
Finn2y ago
🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀 🚀
Mukesh
Mukesh2y ago
Sadbearcat have tried it previously, didn't work
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Mukesh
Mukesh2y ago
hey! it is >= 16
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Mukesh
Mukesh2y ago
didn't get your properly, did you mean to share nixpacks.toml?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Mukesh
Mukesh2y ago
weird, why is the node.js v14?
Finn
Finn2y ago
maybe try removing >= from the version inside your package.json but you can also set the version manually
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Finn
Finn2y ago
ohhh good spot
Mukesh
Mukesh2y ago
ah nope 😅
"engines": {
"node": ">=16"
}
"engines": {
"node": ">=16"
}
it might seem to have extra space due to the font ligatures turned one
Finn
Finn2y ago
you can set NIXPACKS_NODE_VERSION
milo
milo2y ago
No well detect the version form that From There is no reason for us to not
Mukesh
Mukesh2y ago
tysm!! it worked is the reason why railway didn't pick this up is 'cause it was a monorepo?
milo
milo2y ago
ye
Finn
Finn2y ago
EmotiCoolChristmas merry christmass ( thank ahmed not me)
milo
milo2y ago
can we see the repo plesae or
Finn
Finn2y ago
the layout *
milo
milo2y ago
ur structure yes
Mukesh
Mukesh2y ago
gimme a sec
milo
milo2y ago
please pnig reply me when u send it
Mukesh
Mukesh2y ago
milo
milo2y ago
which app u tryna deploy like apps/what
Mukesh
Mukesh2y ago
quick question: would railway pick up the node version from package.json if it was under the root package.json apps/server
milo
milo2y ago
and what is the root path set to on the service settings in railway dashboard package.json at root would be used it doesnt know to look for the package.json in that monorepo nothing we can really do about that unless there is some definitve way to know which directory it is
Mukesh
Mukesh2y ago
/ and the build command is pnpx turbo run server:start ah gotcha
milo
milo2y ago
yeah. if you set it into root package.json, it would read it btw we have firstclass support for turborepo dunno if ur using it or not but if you aren't i'd recommend it can just set NIXPACKS_TURBO_APP_NAME and it'll run that app
Mukesh
Mukesh2y ago
👀 didn't knew about this lemme try it
milo
milo2y ago
u need to remove custom build & start comamnds for this that means theoretically we could read version from two places
Mukesh
Mukesh2y ago
it would be the name in package.json for that app right?
milo
milo2y ago
can u send ur turbo.json please no it might be different so turbo.json should say
Mukesh
Mukesh2y ago
{
"$schema": "https://turborepo.org/schema.json",
"pipeline": {
"build": {
"outputs": ["dist/**", ".next/**"]
},
"start": {
"cache": false
},
"dev": {
"cache": false
},
"watch": {
"outputs": ["dist/**"]
},
"generate": {
"inputs": ["prisma/**"]
}
}
}
{
"$schema": "https://turborepo.org/schema.json",
"pipeline": {
"build": {
"outputs": ["dist/**", ".next/**"]
},
"start": {
"cache": false
},
"dev": {
"cache": false
},
"watch": {
"outputs": ["dist/**"]
},
"generate": {
"inputs": ["prisma/**"]
}
}
}
milo
milo2y ago
oh lol thats useless can u send package.json in apps/server
Mukesh
Mukesh2y ago
{
"name": "server",
"private": true,
"scripts": {
"build": "tsup src/* --outDir dist",
"watch": "tsup --watch",
"start": "cross-env NODE_ENV=production node dist/index.js",
"generate": "prisma generate",
"dev": "cross-env NODE_ENV=development nodemon dist/index.js"
},
"dependencies": {
"@prisma/client": "^4.5.0",
"bs58": "^5.0.0",
"cors": "^2.8.5",
"dotenv": "^16.0.2",
"express": "^4.18.1",
"express-jwt": "^7.7.7",
"express-paginate": "^1.0.2",
"express-rate-limit": "^6.6.0",
"jwt-decode": "^3.1.2",
"p-retry": "4.6.1",
"pika-id": "^1.1.1",
"prefixed-api-key": "^1.1.0",
"prisma-pagination": "^0.2.3",
"svix": "^0.70.0",
"tweetnacl": "^1.0.3",
"uuid": "^9.0.0",
"winston": "^3.8.2",
"winston-discord-webhook": "^1.1.4",
"zod": "^3.19.1"
},
"devDependencies": {
"@candypay/tsconfig": "*",
"@swc/core": "^1.3.20",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.14",
"@types/express-paginate": "^1.0.1",
"@types/uuid": "^8.3.4",
"axios": "^0.27.2",
"cross-env": "^7.0.3",
"nodemon": "^2.0.20",
"prisma": "^4.3.1",
"tsup": "^6.2.3",
"typescript": "^4.5.3",
"vitest": "^0.25.3"
}
}
{
"name": "server",
"private": true,
"scripts": {
"build": "tsup src/* --outDir dist",
"watch": "tsup --watch",
"start": "cross-env NODE_ENV=production node dist/index.js",
"generate": "prisma generate",
"dev": "cross-env NODE_ENV=development nodemon dist/index.js"
},
"dependencies": {
"@prisma/client": "^4.5.0",
"bs58": "^5.0.0",
"cors": "^2.8.5",
"dotenv": "^16.0.2",
"express": "^4.18.1",
"express-jwt": "^7.7.7",
"express-paginate": "^1.0.2",
"express-rate-limit": "^6.6.0",
"jwt-decode": "^3.1.2",
"p-retry": "4.6.1",
"pika-id": "^1.1.1",
"prefixed-api-key": "^1.1.0",
"prisma-pagination": "^0.2.3",
"svix": "^0.70.0",
"tweetnacl": "^1.0.3",
"uuid": "^9.0.0",
"winston": "^3.8.2",
"winston-discord-webhook": "^1.1.4",
"zod": "^3.19.1"
},
"devDependencies": {
"@candypay/tsconfig": "*",
"@swc/core": "^1.3.20",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.14",
"@types/express-paginate": "^1.0.1",
"@types/uuid": "^8.3.4",
"axios": "^0.27.2",
"cross-env": "^7.0.3",
"nodemon": "^2.0.20",
"prisma": "^4.3.1",
"tsup": "^6.2.3",
"typescript": "^4.5.3",
"vitest": "^0.25.3"
}
}
milo
milo2y ago
dependencies yum okay thanks so if u set it to server it should work im p sure it depends on the package.json name if not, the directory name
Mukesh
Mukesh2y ago
gotcha need to clean up, few unused dependencies lmfao
milo
milo2y ago
haha
Want results from more Discord servers?
Add your server