You'll need to run three terminals (or bring in a process manager like concurrently/pm2-dev if you like):
Start the Remix development asset server
npm run devIn a new tab start functions TypeScript compiler:
npm run dev:functionsIn a new tab start Firebase emulators:
npm run startFirst, build your Remix app for production:
npm run buildSecond, build Cloud Functions:
npm run build:functionsThen deploy your Cloud Functions and Hosting (this runs the functions build script as well)
firebase deploy --only hosting,functions:remix