9 months 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
npxto call prisma commands (npx prisma generate...).Using a
postinstallscript inpackage.json.Using a
nixpacks.tomlfile to explicitly define the build and start phases.The current approach uses
nixpacks.tomlto callnpm run build.
Here is my current configuration:
[phases.install]cmds = ["npm install"]
cmds = ["npm run build"]
[start]
cmd = "npm start"
package.jsonscripts 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 buildstep withexit code 127. It seems like the binaries innode_modulesare not available to the shell during the build phase.
0 Replies