gpt4 book ai didi

node.js - sh : line 1: 5751 Segmentation fault sequelize db:migrate (Node. js + Sequelize + Postgresql)

转载 作者:行者123 更新时间:2023-12-03 22:26:47 25 4
gpt4 key购买 nike

运行 sequelize db:migrate 会在弹性 beanstalk 中出现段错误。

-------------------------------------
/var/log/nodejs/nodejs.log
-------------------------------------
> sequelize db:migrate && node server.js


[4mSequelize CLI [Node: 10.16.0, CLI: 5.4.0, ORM: 5.8.7][24m

Loaded configuration file "sequelize/config/config.js".
Using environment "production".
sh: line 1: 10118 Segmentation fault sequelize db:migrate
npm ERR! code ELIFECYCLE
npm ERR! errno 139
npm ERR! code@1.0.0 start: `sequelize db:migrate && node server.js`
npm ERR! Exit status 139
npm ERR!
npm ERR! Failed at the timeline_api@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

> code@1.0.0 start /var/app/current
> sequelize db:migrate && node server.js
-------------------------------------

最佳答案

问题与包 pg-native 相关。切换 pg 解决了这个问题。

// Sequelize config
production: {
...
// or don't set this value.
native: false,
...
},

问题似乎也与 Node 版本有关。据说它不适用于 node 10 (需要更多说明)。
资料来源:

https://github.com/brianc/node-pg-native/issues/71

https://github.com/brianc/node-pg-native/issues/70

关于node.js - sh : line 1: 5751 Segmentation fault sequelize db:migrate (Node. js + Sequelize + Postgresql),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56747493/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com