24 days ago
Hello! I'm having trouble deploying a Node.js + Prisma application. My build fails consistently with exit code 127
, which suggests the prisma
command is not found during the build step, even though it is correctly configured.
What I've already tried:
Moved prisma
from devDependencies
to dependencies
.
Using
npx
to call prisma commands (npx prisma generate...
).Using a
postinstall
script inpackage.json
.Using a
nixpacks.toml
file to explicitly define the build and start phases.The current approach uses
nixpacks.toml
to callnpm run build
.
Here is my current configuration:
[phases.install]cmds = ["npm install"]
cmds = ["npm run build"]
[start]
cmd = "npm start"
package.json
scripts section:
"scripts": {"start": "node src/app.js",
"build": "npx prisma generate && npx prisma migrate deploy",
"dev": "nodemon src/app.js",
"test": "jest"
},
The build fails on thenpm run build
step withexit code 127
. It seems like the binaries innode_modules
are not available to the shell during the build phase.
0 Replies