Open
Description
Describe the bug
Structure of my projet
/monorepo
node_modules
packages
server
migrations
node_modules
The server package contains the script to create migrations.
When I run node-pg-migrate create -j ts
, the binary tries to load the templates files from the server node_modules folder and throws an error because the monorepo node_modules folder contains the package
I found a workaround by adding the option --templateFileName ../../node_modules/node-pg-migrate/templates/migration-template.ts
to the command line but didn't have the problem in previous versions of node-pg-migrate
Steps to reproduce
cd [path_to_monorepo]/packages/server
node-pg-migrate create -j ts [migration_name]
Logs
[Error: ENOENT: no such file or directory, open '[...]/monorepo/packages/server/node_modules/node-pg-migrate/templates/migration-template.ts'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '[...]/monorepo/packages/server/node_modules/node-pg-migrate/templates/migration-template.ts'
}
System Info
MacOS Somona 14.5
Node 20.15.1
node-pg-migrate 7.5.2
Used Module System
esm