You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by brandon-kyle-bailey May 26, 2022
Environment info:
"nodejs": "14.18.1"
"npm": "8.1.4"
"sequelize": "6.20.0"
"umzug": "3.1.1"
"pg": "8.7.3"
"typescript": "4.0.3"
Following the documentation to setup a migration flow with Sequelize and Umzug for a Postgres database presents the following error message:
{
"errorType": "TypeError",
"errorMessage": "Converting circular structure to JSON\n --> starting at object with constructor 'Sequelize5'\n | property 'dialect' -> object with constructor 'PostgresDialect'\n --- property 'sequelize' closes the circle",
"stack": [
"TypeError: Converting circular structure to JSON",
" --> starting at object with constructor 'Sequelize5'",
" | property 'dialect' -> object with constructor 'PostgresDialect'",
" --- property 'sequelize' closes the circle",
" at JSON.stringify (<anonymous>)",
" at /var/task/index.js:87561:17",
" at /var/task/index.js:19377:31",
" at /var/task/index.js:23989:7",
" at Array.forEach (<anonymous>)",
" at sendLogEventToAppender (/var/task/index.js:23988:23)",
" at /var/task/index.js:19245:30",
" at Array.forEach (<anonymous>)",
" at sendToListeners (/var/task/index.js:19245:15)",
" at Object.send (/var/task/index.js:19296:9)"
]
}
Minimal code example:
runMigrations.ts
import { SequelizeStorage, Umzug } from "umzug";
import { Sequelize } from "sequelize";
import * as pg from "pg";
const sequelize = new Sequelize(dbname, username, password, {
host,
port,
dialect: "postgres",
dialectModule: pg,
});
const sequelizeStorage = new SequelizeStorage({ sequelize });
const umzug = new Umzug({
...
storage: sequelizeStorage,
context: { sequelize },
logger: console,
});
Going to close this as can't-reproduce / no-response. @brandon-kyle-bailey I suspect this is a dependencies issue, but since the latest umzug version requires the emittery version with the fix, I don't think there's anything more umzug can do. If it's a different issue, could you open a PR with a failing test case?
Discussed in #555
Originally posted by brandon-kyle-bailey May 26, 2022
Environment info:
Following the documentation to setup a migration flow with Sequelize and Umzug for a Postgres database presents the following error message:
Minimal code example:
runMigrations.ts
Migration.ts
The error presents when calling new SequelizeStorage() passing in the configures sequelize instance, per the documentation.
Kind of stuck on this. Any suggestions? TY!
The text was updated successfully, but these errors were encountered: