# JS monorepo deployment with Turborepo

**URL:** <https://community.fly.io/t/js-monorepo-deployment-with-turborepo/3603>\
**Category:** Questions / Help\
**Created:** [January 5, 2022, 11:34pm UTC](https://community.fly.io/t/js-monorepo-deployment-with-turborepo/3603 "2022-01-05T23:34:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexluong](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/alexluong/32/9206_2.png) [@alexluong](https://community.fly.io/u/alexluong)\
**Post date:** [January 5, 2022, 11:34pm UTC](https://community.fly.io/t/js-monorepo-deployment-with-turborepo/3603/1 "2022-01-05T23:34:46Z")

</div>

Hi, I’m trying to set up a monorepo with Turborepo deployment with [Fly.io](http://Fly.io) and run into some problems.

I looked into [Fly.io doc on monorepo](https://fly.io/docs/reference/monorepo/) but not sure how it would work since I need to build all the dependencies during build.

The turborepo I’m trying out is the kitchen sink example here: [turborepo/examples/kitchen-sink at main · vercel/turborepo · GitHub](https://github.com/vercel/turborepo/tree/main/examples/kitchen-sink). I’m mainly interested in the Remix deployment right now, but Next.js and maybe a NodeJS BE in the future.

Would appreciate any help or pointer to see how I can get this to work. Thanks!

---

<div class="post-metadata">

**Author:** ![FrequentFlyer](https://avatars.discourse-cdn.com/v4/letter/f/d26b3c/32.png) [@FrequentFlyer](https://community.fly.io/u/FrequentFlyer)\
**Post date:** [January 6, 2022, 4:06am UTC](https://community.fly.io/t/js-monorepo-deployment-with-turborepo/3603/2 "2022-01-06T04:06:22Z")

</div>

Hi Alex,

Going a bit outside my comfort zone here… please see if the below is helpful.

In the Fly monorepo link you’ve shared, there’s a [link](https://docs.docker.com/develop/develop-images/multistage-build/) to doing multi-stage builds.

On to Remix, you could look at these for reference:  
[https://fly.io/docs/getting-started/remix/](https://fly.io/docs/getting-started/remix/)  
[https://github.com/fly-apps/hello-remix](https://github.com/fly-apps/hello-remix)  
[https://remix.run/docs/en/v1/tutorials/jokes](https://remix.run/docs/en/v1/tutorials/jokes)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![VSL](https://avatars.discourse-cdn.com/v4/letter/v/ecccb3/32.png) [@VSL](https://community.fly.io/u/VSL)\
**Post date:** [July 12, 2023, 4:37pm UTC](https://community.fly.io/t/js-monorepo-deployment-with-turborepo/3603/3 "2023-07-12T16:37:58Z")

</div>

I’m having issues as well, it seems that any module imported into my remix app from my packages are not bundled. Here is my remix.config.js below, for example getting error when importing anything from “web-ui” or “api” , am I missing something?

```auto
/** @type {import('@remix-run/dev').AppConfig} */
module.exports = {
  ignoredRouteFiles: ["**/.*"],
  // appDirectory: "app",
  // assetsBuildDirectory: "public/build",
  // serverBuildPath: "build/index.js",
  // publicPath: "/build/",
  tailwind: true,
  postcss: true,
  serverModuleFormat: "cjs",
  watchPaths: [
    "./tailwind.config.ts",
    "../../packages/testing",
    "../../packages/tailwind-config",
    "../../packages/web-ui",
    "../../packages/utils",
    "../../packages/shared-ui",
    "../../packages/types",
    "../../packages/api",
  ],
  serverDependenciesToBundle: [
    "api",
    "web-ui",
    "tailwind-config",
    "testing",
    "utils",
    "shared-ui",
    "types",
    "axios",
  ],
  future: {
    v2_dev: true,
    v2_errorBoundary: true,
    v2_headers: true,
    v2_meta: true,
    v2_normalizeFormMethod: true,
    v2_routeConvention: true,
  },
};

```
