在我config.json运行Sequelize -mPostgres的方言sequelize -m不工作
"development": {
"username": "root",
"password": null,
"database": "**********",
"dialect": "postgres",
"protocol": "postgres",
"port": 5432,
"host": "127.0.0.1"
},
收到错误:
sequelize -m
Loaded configuration file "config/config.json".
Using environment "development".
/usr/local/lib/node_modules/sequelize/lib/transaction-manager.js:10
throw new Error("The dialect " + sequelize.getDialect() + " is not support
^
Error: The dialect postgres is not supported.
at new module.exports (/usr/local/lib/node_modules/sequelize/lib/transaction-manager.js:10:11)
at new module.exports.Sequelize (/usr/local/lib/node_modules/sequelize/lib/sequelize.js:128:31)
at Object.<anonymous> (/usr/local/lib/node_modules/sequelize/bin/sequelize:225:27)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
有没有在我的配置有问题,或者别的可能是这个问题?
我已经安装了pg模块,并在应用程序中运行sequelize。唯一不适用的地方是运行二进制迁移时。在这一点上,我得到'错误'。方言在整个应用程序的其余部分工作 – pjbr