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
D:\BestBuyAPI\api-playground\src\db\index.js:36
var model = sequelize['import'](path.join(__dirname, file));
^
TypeError: sequelize.import is not a function
at D:\BestBuyAPI\api-playground\src\db\index.js:36:38
at Array.forEach ()
at Function.setupDatabase (D:\BestBuyAPI\api-playground\src\db\index.js:35:6)
at Function.configure (D:\BestBuyAPI\api-playground\node_modules\feathers\lib\application.js:150:8)
at Function.module.exports (D:\BestBuyAPI\api-playground\src\services\index.js:11:7)
at Function.configure (D:\BestBuyAPI\api-playground\node_modules\feathers\lib\application.js:150:8)
at Object. (D:\BestBuyAPI\api-playground\src\app.js:31:4)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
The text was updated successfully, but these errors were encountered:
Replace
var model = sequelize['import'](path.join(__dirname, file));
to
var model = require(path.join(__dirname, file))(sequelize, Sequelize.DataTypes);
Getting Below error while performing npn start
D:\BestBuyAPI\api-playground>npm start
D:\BestBuyAPI\api-playground\src\db\index.js:36
var model = sequelize['import'](path.join(__dirname, file));
^
TypeError: sequelize.import is not a function
at D:\BestBuyAPI\api-playground\src\db\index.js:36:38
at Array.forEach ()
at Function.setupDatabase (D:\BestBuyAPI\api-playground\src\db\index.js:35:6)
at Function.configure (D:\BestBuyAPI\api-playground\node_modules\feathers\lib\application.js:150:8)
at Function.module.exports (D:\BestBuyAPI\api-playground\src\services\index.js:11:7)
at Function.configure (D:\BestBuyAPI\api-playground\node_modules\feathers\lib\application.js:150:8)
at Object. (D:\BestBuyAPI\api-playground\src\app.js:31:4)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
The text was updated successfully, but these errors were encountered: