{"id":21133,"date":"2026-10-21T03:00:54","date_gmt":"2026-10-21T03:00:54","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=21133"},"modified":"2026-10-29T15:20:09","modified_gmt":"2026-10-29T15:20:09","slug":"how-to-deploy-prisma-apps-on-hostinger-node-js-hosting","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/how-to-deploy-prisma-apps-on-hostinger-node-js-hosting\/","title":{"rendered":"How to deploy Prisma apps on Hostinger"},"content":{"rendered":"<p>Prisma apps deploy on Hostinger hosting like any other Node.js app, using the build command from your <code>package.json<\/code> file. Most Prisma build failures have four causes: the Prisma CLI is only in <code>devDependencies<\/code>, the Prisma version isn&rsquo;t pinned, <code>DATABASE_URL<\/code> is missing at build time, or the Prisma engine is missing. Fix these before deploying, and use the build log to find which step failed.<\/p><h2 id=\"h-build-commands-for-node-js-apps-at-hostinger\">Build commands for Node.js apps at Hostinger<\/h2><p>Hostinger accepts any build command from the <code>scripts<\/code> section of your <code>package.json<\/code> file. There&rsquo;s no list of allowed commands, and you set the build command in the build settings when you <a data-click-id=\"hgr-post-content-link-add-a-node-js-web-app-in-hostinger\" href=\"\/support\/how-to-deploy-a-nodejs-website-in-hostinger\/\">add a Node.js web app in Hostinger<\/a>. For example, <code>npm run build<\/code>, <code>pnpm build<\/code> and <code>npx prisma generate &amp;&amp; next build<\/code> all work.<\/p><p>Hostinger installs dependencies with the package manager detected from your lock file. When a lock file exists, npm projects are installed with <code>npm ci<\/code>.<\/p><h2 id=\"h-prepare-a-prisma-app-for-hostinger\">Prepare a Prisma app for Hostinger<\/h2><h3>Step 1 &ndash; Make the Prisma CLI available during the build<\/h3><p>Move <code>prisma<\/code> from <code>devDependencies<\/code> to <code>dependencies<\/code> in <code>package.json<\/code> if the build log shows <code>prisma: not found<\/code>. Alternatively, generate the Prisma client automatically after installation:<\/p><pre><code>\"scripts\": {\r\n  \"postinstall\": \"prisma generate\"\r\n}<\/code><\/pre><h3>Step 2 &ndash; Pin the Prisma version<\/h3><p>Set exact versions for <code>prisma<\/code> and <code>@prisma\/client<\/code> in <code>package.json<\/code>, for example <code>\"prisma\": \"6.5.0\"<\/code> instead of <code>\"prisma\": \"^6.5.0\"<\/code>. An unpinned version can install a newer major version with changed configuration or removed commands.<\/p><h3>Step 3 &ndash; Add DATABASE_URL for migrations<\/h3><p>Add <code>DATABASE_URL<\/code> as an environment variable if your build runs <code>prisma migrate deploy<\/code> or <code>prisma db push<\/code>, as described in <a data-click-id=\"hgr-post-content-link-how-to-add-environment-variables-during-node-js-application\" href=\"\/support\/how-to-add-environment-variables-during-node-js-application-deployment\/\">how to add environment variables during Node.js application deployment<\/a>. These commands connect to the database during the build. Use <code>127.0.0.1<\/code> as the host for a Hostinger MySQL database:<\/p><pre><code>DATABASE_URL=mysql:\/\/u123456789_user:password@127.0.0.1:3306\/u123456789_database<\/code><\/pre><p>To get these values, see <a data-click-id=\"hgr-post-content-link-how-to-find-your-mysql-database-details-in-hostinger\" href=\"\/support\/1583552-how-to-find-your-mysql-database-details-in-hostinger\/\">how to find your MySQL database details in Hostinger<\/a>. For the full database setup, see <a data-click-id=\"hgr-post-content-link-connecting-a-hostinger-mysql-database-to-a-node-js-applicati\" href=\"\/support\/connecting-a-hostinger-mysql-database-to-a-node-js-application\/\">connecting a Hostinger MySQL database to a Node.js application<\/a>.<\/p><h3>Step 4 &ndash; Add the Prisma engine for the server<\/h3><p>Add <code>binaryTargets<\/code> to the generator block in <code>schema.prisma<\/code> if the app builds but fails at runtime because the Prisma engine is missing:<\/p><pre><code>generator client {\r\n  provider      = \"prisma-client-js\"\r\n  binaryTargets = [\"native\", \"rhel-openssl-1.1.x\"]\r\n}<\/code><\/pre><p><a data-click-id=\"hgr-post-content-link-redeploy-the-node-js-application\" href=\"\/support\/how-to-redeploy-a-node-js-application\/\">Redeploy the Node.js application<\/a> after these changes.<\/p><h2 id=\"h-find-where-a-prisma-build-fails\">Find where a Prisma build fails<\/h2><p>Open the build log and look at the last command before the error. That command shows which step failed:<\/p><ul>\n<li><b>Installing packages:<\/b> a dependency problem, such as a version conflict.<\/li>\n<li><b><code>prisma generate<\/code>:<\/b> a problem with the Prisma CLI, schema or version.<\/li>\n<li><b><code>next build<\/code> or a similar command:<\/b> a problem in the app&rsquo;s own code.<\/li>\n<\/ul><p>To reproduce the error, run <code>npm ci &amp;&amp; npm run build<\/code> on your own computer with the same Node.js version, as set in <a data-click-id=\"hgr-post-content-link-how-to-select-the-node-js-version-for-your-application\" href=\"\/support\/how-to-select-the-node-js-version-for-your-application\/\">how to select the Node.js version for your application<\/a>. For more on reading build logs, see <a data-click-id=\"hgr-post-content-link-how-to-troubleshoot-node-js-deployment-build-errors-at-hosti\" href=\"\/support\/how-to-troubleshoot-a-failed-node-js-deployment-using-build-logs\/\">how to troubleshoot Node.js deployment build errors at Hostinger<\/a> and <a data-click-id=\"hgr-post-content-link-how-to-fix-the-failed-to-build-the-application-error-in-host\" href=\"\/support\/fix-failed-to-build-application-error-hostinger-node-js\/\">how to fix the &ldquo;Failed to build the application&rdquo; error in Hostinger Node.js<\/a>.<\/p><p>With the Prisma CLI available, the version pinned and the database variables set, your Prisma app builds and deploys on Hostinger like any other Node.js app.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Fix common Prisma build failures and find which build step failed on Hostinger.<\/p>\n","protected":false},"author":594,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[301],"tags":[],"class_list":["post-21133","post","type-post","status-publish","format-standard","hentry","category-node-js"],"hreflangs":[],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/21133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/594"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=21133"}],"version-history":[{"count":8,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/21133\/revisions"}],"predecessor-version":[{"id":23876,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/21133\/revisions\/23876"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=21133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=21133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=21133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}