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: https://glowing-pony-b2662a.netlify.app

Here are my deploy settings:

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

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

[dev]
command = “remix watch”
port = 3000

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

[[headers]]
for = “/build/*”
[headers.values]
“Cache-Control” = “public, max-age=31536000, s-maxage=31536000”

Here is a link to the repo
https://github.com/th-m/sound-sculpt-mono

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

I

  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?

Here is the site:

/**
 * @type {import('@remix-run/dev/config').AppConfig}
 */
module.exports = {
  serverBuildTarget: "netlify",
  server:
    process.env.NETLIFY || process.env.NETLIFY_LOCAL
      ? "./server.js"
      : undefined,
      ignoredRouteFiles: ["**/.*"],
      future: {}
};