sequelize / cli

The Sequelize CLI
MIT License
2.53k stars 528 forks source link

const model = require(path.join(__dirname, file)).default( ^ TypeError: require(...).default is not a function #1381

Closed DasoTD closed 1 year ago

DasoTD commented 1 year ago

What you are doing?

// code here

What do you expect to happen?

I wanted Foo!

What is actually happening?

I have got const model = require(path.join(__dirname, file)).default( ^ TypeError: require(...).default is not a function error while using "sequelize": "^6.33.0", But the output was bar!

Output, either JSON or SQL

Dialect: mysql / postgres / sqlite / mssql / any Database version: XXX Sequelize CLI version: XXX Sequelize version: XXX