Deploying Remix apps with monorepo NX

I am having trouble setting up a deploy for my Remix project that is contained within an NX mono-repo.

the deploy executes successfully, but I get 404s from when visiting the site. If there is something apparent that I am doing incorrectly I would love some correction.

Here is the site:

Here are my deploy settings:

Base directory: /
Build command: npx nx build market
Publish directory: /packages/market

Here is my toml file:
command = “remix build”
functions = “netlify/functions”
publish = “public”

command = “remix watch”
port = 3000

from = “/*”
to = “/.netlify/functions/server”
status = 200

for = “/build/*”
“Cache-Control” = “public, max-age=31536000, s-maxage=31536000”

Here is a link to the repo

OK I figured it out.

After going through the remix deploy to netlify video by good ol Kent → Deploy Remix to Netlify Serverless Functions in less than 3 minutes - YouTube


  1. changed my build settings to:

Base directory:/packages/market
Build command:remix build
Publish directory: /packages/market/public

  1. Generated a public access token

  2. Updated /packages/market/package.json
    “dev”: “cross-env NODE_ENV=development netlify dev”,
    “start”: “cross-env NODE_ENV=production netlify dev”,

  3. ran netlify init & netlify link

  4. ensured deps were listed in /packages/market/package.json as well ass /package.json

  5. added a /packages/market/server.js

7 and updated the /packages/market/remix.config.js

Hey there, @th-m :wave:

Thanks so much for coming back and sharing your solution here. This will be beneficial for future Forums members who encounter something similar, so we appreciate it.

Happy building! :netliconfetti:

Can you tell me how you edited your remix config? I watched the referenced video but it mentioned nothing about all the changes you made. I am struggling to deploy an nx remix app without the page not found error.

Could you share your site name?