blues-stack icon indicating copy to clipboard operation
blues-stack copied to clipboard

Deployment failing due to seed not working

Open zabirauf opened this issue 2 years ago • 13 comments

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

Running the CI/CD pipeline through github actions or the fly deploy and then I get error that results in failure of deployment.

Expected Behavior

Deployment works and seeding succeeds

Actual Behavior

2022-12-29T09:58:59Z app[63b7991f] sea [info]Running seed command `ts-node --require tsconfig-paths/register prisma/seed.ts` ...
2022-12-29T09:58:59Z app[63b7991f] sea [info]An error occurred while running the seed command:
2022-12-29T09:58:59Z app[63b7991f] sea [info]Error: Command failed with ENOENT: ts-node --require tsconfig-paths/register prisma/seed.ts
2022-12-29T09:58:59Z app[63b7991f] sea [info]spawn ts-node ENOENT

Looks like as the "prisma.seed" in the package.json and using ts-node while the Dockerfile in production image doesn't have ts-node so it just fails. I couldn't find where the prisma seed is being invoked from either in docker file or elsewhere so not sure what needs to be moved where.

zabirauf avatar Dec 29 '22 10:12 zabirauf