Dynamic pages not rendering on Vercel deployment

I am definitely missing something here. I have created a website using plasmic, that also has pages that are dynamically generated (it has a slug in the path). It takes the slug, and fetches some data using the REST fetcher. This all works fine in studio, locally dev and also when I build the nextjs project and running it locally. But when I deploy it to vercel, only pages without dynamic params in URL path are rendering correctly. Everything that is dynamic returns a 500. Logs on vercel says Error: Cannot find module '@plasmicapp/watcher' . I’ve created the code base using “create-plasmic-app”, chose Nextjs with the “old” way it handles pages, and using loader.

Interestingly, the studio works with the new app host url from vercel (even the dynamic pages). What I am missing?

I think it’s because the paths were not added to [[...catchall]].tsx, how can I add them without knowing all slugs upfront? also there are too many, so it shouldn’t be generated upfront

and here is the full error in the logs from vercel (in case it is helpful):

2023-04-26T12:27:00.978Z	undefined	INFO	info  - Loaded env from /var/task/.env
Subscribing to Plasmic changes...
Error: Cannot find module '@plasmicapp/watcher'
Require stack:
- /var/task/node_modules/@plasmicapp/loader-nextjs/dist/index.js
- /var/task/.next/server/pages/[[...catchall]].js
- /var/task/node_modules/next/dist/server/require.js
- /var/task/node_modules/next/dist/server/next-server.js
- /var/task/___next_launcher.cjs
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at mod._resolveFilename (/var/task/node_modules/next/dist/build/webpack/require-hook.js:23:32)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at serverRequire (/var/task/node_modules/@plasmicapp/loader-nextjs/dist/index.js:113:10)
    at initPlasmicLoaderWithCache (/var/task/node_modules/@plasmicapp/loader-nextjs/dist/index.js:196:44)
    at initPlasmicLoader (/var/task/node_modules/@plasmicapp/loader-nextjs/dist/index.js:282:10)
    at 692 (/var/task/.next/server/chunks/692.js:170:53)
    at __webpack_require__ (/var/task/.next/server/webpack-runtime.js:25:42) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/var/task/node_modules/@plasmicapp/loader-nextjs/dist/index.js',
    '/var/task/.next/server/pages/[[...catchall]].js',
    '/var/task/node_modules/next/dist/server/require.js',
    '/var/task/node_modules/next/dist/server/next-server.js',
    '/var/task/___next_launcher.cjs'
  ],
  page: '/brand/acne-studios'
}
RequestId: 2f1caf3d-22df-4294-bf08-3de8b2d41ebc Error: Runtime exited with error: exit status 1
Runtime.ExitError

Hey Dennis! I sent you a DM to collect more info

Hey, I’m having the same issue, any potential fixes?