How to setup the dev script to also re generate:types in the package.json?
just change your nodemon.json to:
{
"ext": "ts",
"exec": "yarn generate:types && ts-node src/server.ts",
"ignore": "src/payload-types.ts"
}
hey @leonardstruck, I tried your suggestion, but since
generate:types
starts the server, I get an error that there's already something on the port when nodemon tries to run
ts-node src/server.ts
🤔 am I missing something?
I can't recall running into this at all.. Maybe you have some zombie node process running in the background? You could try
killall node
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.