Hi there, I have a question, I am working with the...
# sst
j
Hi there, I have a question, I am working with the latest version of sst with typeorm, now, when I run the migrations it works fine but if I try to run an endpoint I get the following error, do you know why?
this is my ormconfig.json
Copy code
import * as dotenv from "dotenv";
import { ConnectionOptions } from "typeorm";

dotenv.config();

import { User } from "./entity/User";

const config: ConnectionOptions = {
  type: "mysql",
  host: process.env.DB_HOST,
  port: 3306,
  username: process.env.DB_USER,
  password: process.env.DB_PASSWORD,
  database: process.env.DB_NAME,
  synchronize: false,
  logging: false,
  entities: [User],
  migrationsRun: false,
  migrations: ["src/db/migration/*{.ts,.js}"],
  // subscribers: ["src/subscriber/**/*.ts"],
  cli: {
    entitiesDir: "src/db/entity",
    migrationsDir: "src/db/migration",
    subscribersDir: "src/subscriber",
  },
};

export default config;
but if I comment the migrations line works well
f
Hey @Joel Corona, sorry man.. missed this thread.
Did you manage to figure out the issue?
j
The only way is by commenting and uncommenting that line, I comment it to make the requests and I uncomment it to carry out the migrations