How can I use Kysely migration inside NextJS 13 project?
I created a folder called kysely in root directory of next js then created a migrator.ts which contains migration code (Migrator) and created a folder inside kysely folder called migrations then I placed all migrations in it. I tried to run the migrator.ts file with ts-node but it's throwing some module import issues (cannot use import module outside a module) how can I run migration in nextjs
Solution:Jump to solution
Fixed the issue by replacing ts-node with tsx
and also changed migrationFolder path to absolute path
```typescript
const migrator = new Migrator({...
1 Reply
Solution
Fixed the issue by replacing ts-node with tsx
and also changed migrationFolder path to absolute path