#Have a problem with migration

2 messages · Page 1 of 1 (latest)

smoky igloo
#

When i tried to run migration in Procfile Heroku i had error that tsconfig-path module not found.
"migration:up": "./node_modules/.bin/ts-node -r ./node_modules/tsconfig-paths/register ./node_modules/.bin/typeorm migration:run -d ./ormconfig.ts"
How to solve this problem ?

marble finch
#

Depending on your Dockerfile / buildpack, you might not have devDependencies installed in the final image. That's the default behaviour of many package managers when running install with NODE_ENV=production.

You could either update your migrations so they use the compiled app (e.g. don't need ts-node, tsconfig-paths etc).
Or you could move all devDependencies that are required for migrations to your dependencies instead. That's a quick fix, but you'll have slower app deployments because of the extra size.