如何解决在开发模式下在帆应用程序中连接postgres时收到超时错误?
我正在尝试使用 sails 框架开发一个简单的HTTP API。我已经创建了模型,控制器,助手和路线,以完成API的工作流程,但是当我在开发模式下提升Sails应用程序时,在设置migration = alter时出现超时错误。自行调试后,得出的结论是我的sails应用程序未与Postgres连接。
我已经安装了所有相关的依赖项(例如 sails-postgresql , pg 等。),我在config.model文件中设置了正确的URL。我不知道我在想什么。 有任何建议吗?
版本:sails-1.2.4,postgresql-12.4
编辑:这是我遇到的错误。
nirajrajput@Nirajs-MacBook-Pro demosails % node app.js
(node:29522) Warning: Accessing non-existent property 'padLevels' of
module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was
created)
info: ·• Auto-migrating... (alter)
info: Hold tight,this could take a moment.
error: Failed to lift app: Error: Sails is taking too long to load.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- --
Troubleshooting tips:
-• Were you still reading/responding to an interactive prompt?
(Whoops,sorry! Please lift again and try to respond a bit more
quickly.)
-• Do you have a lot of stuff in `assets/`? Grunt might still be
running.
(Try increasing the hook timeout. Currently it is 40000.
e.g. `sails lift --hookTimeout=80000`)
-• Is `blueprints` a custom or 3rd party hook?
(*If* `initialize()` is using a callback,make sure it's being
called.)
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- --
at Timeout.tooLong [as _onTimeout] (/Users/nirajrajput/demosails/node_modules/sails/lib/app/private/loadHooks.js:191:21)
at listOnTimeout (internal/timers.js:551:17)
at processTimers (internal/timers.js:494:7)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。