{"id":21136,"date":"2026-10-21T03:05:58","date_gmt":"2026-10-21T03:05:58","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=21136"},"modified":"2026-10-21T03:51:11","modified_gmt":"2026-10-21T03:51:11","slug":"how-to-deploy-monorepos-with-npm-yarn-or-pnpm-on-hostinger","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/how-to-deploy-monorepos-with-npm-yarn-or-pnpm-on-hostinger\/","title":{"rendered":"How to deploy monorepos with npm, yarn or pnpm on Hostinger"},"content":{"rendered":"<p>Hostinger Node.js monorepo hosting supports npm, yarn and pnpm, and lets you deploy any app from a repository that holds several apps. Hostinger detects the package manager from your lock file, and you choose which app to deploy with the <b>Root directory<\/b> setting. Each app from a monorepo is deployed as a separate Node.js website.<\/p><h2 id=\"h-package-managers-supported\">Package managers supported<\/h2><p>Hostinger supports three package managers and picks one automatically based on the lock file in your project:<\/p><div class=\"intercom-interblocks-table-container\">\n<table role=\"presentation\">\n<tbody>\n<tr>\n<td style=\"background-color: #e3e7fa80;width: 261px\">\n<p class=\"intercom-align-center no-margin\"><b>Lock file<\/b><\/p>\n<\/td>\n<td style=\"background-color: #e3e7fa80\">\n<p class=\"intercom-align-center no-margin\"><b>Package manager used<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\"><code>package-lock.json<\/code><\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">npm<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\"><code>yarn.lock<\/code><\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">yarn<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\"><code>pnpm-lock.yaml<\/code><\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">pnpm<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div><p>Hostinger also follows the <code>packageManager<\/code> field in <code>package.json<\/code>, for example <code>\"packageManager\": \"pnpm@9.0.0\"<\/code>, to use a specific version. Bun isn&rsquo;t supported.<\/p><h2 id=\"h-deploy-one-app-from-a-monorepo\">Deploy one app from a monorepo<\/h2><h3>Step 1 &ndash; Start a GitHub deployment<\/h3><p>Start a new Node.js deployment from your GitHub repository, as described in <a data-click-id=\"hgr-post-content-link-how-to-add-a-node-js-web-app-in-hostinger\" href=\"https:\/\/www.hostinger.com\/support\/how-to-deploy-a-nodejs-website-in-hostinger\/\">how to add a Node.js web app in Hostinger<\/a>.<\/p><h3>Step 2 &ndash; Set the root directory<\/h3><p>In the build settings, set <b>Root directory<\/b> to the folder of the app you want to deploy, for example <code>apps\/web<\/code>.<\/p><h3>Step 3 &ndash; Set the build command, output directory and entry file<\/h3><p>Enter the build command, output directory and entry file for that specific app, then click <b>Deploy<\/b>. To change these settings later, <a data-click-id=\"hgr-post-content-link-redeploy-the-node-js-application\" href=\"https:\/\/www.hostinger.com\/support\/how-to-redeploy-a-node-js-application\/\">redeploy the Node.js application<\/a> with the updated values.<\/p><p><b>NOTE<\/b><\/p><ul>\n<li>Each app from a monorepo is a separate Node.js website and counts toward your plan&rsquo;s Node.js website limit. See <a data-click-id=\"hgr-post-content-link-parameters-and-limits-of-hosting-plans-in-hostinger\" href=\"https:\/\/www.hostinger.com\/support\/6976044-parameters-and-limits-of-hosting-plans-in-hostinger\/\">parameters and limits of hosting plans in Hostinger<\/a>.<\/li>\n<\/ul><h2 id=\"h-deploy-turborepo-or-nx-workspaces\">Deploy Turborepo or Nx workspaces<\/h2><p>Keep <b>Root directory<\/b> set to the repository root (<code>.\/<\/code>) for Turborepo or Nx workspaces that need the whole repository installed. Then use a build command that builds only one app, and point the output directory to that app:<\/p><ul>\n<li><b>Build command:<\/b> <code>pnpm --filter web build<\/code><\/li>\n<li><b>Output directory:<\/b> <code>apps\/web\/.next<\/code><\/li>\n<\/ul><p>Replace <code>web<\/code> with the name of your app&rsquo;s package. If an app doesn&rsquo;t show your latest changes after deployment, see <a data-click-id=\"hgr-post-content-link-how-to-fix-changes-not-showing-after-a-node-js-deployment-at\" href=\"https:\/\/www.hostinger.com\/support\/how-to-fix-changes-not-showing-after-a-node-js-deployment-at-hostinger\/\">how to fix changes not showing after a Node.js deployment at Hostinger<\/a>.<\/p><p>With the root directory and build settings set for each app, every app in your monorepo deploys and updates as its own Node.js website.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Deploy one app from a monorepo and choose npm, yarn or pnpm 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-21136","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\/21136","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=21136"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/21136\/revisions"}],"predecessor-version":[{"id":21164,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/21136\/revisions\/21164"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=21136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=21136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=21136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}