sequelize / cli

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

Error on running db: migrate with Node 18.17.9 #1347

Open alpha951 opened 1 year ago

alpha951 commented 1 year ago
> npx sequelize-cli db:migrate

Sequelize CLI [Node: 18.17.0, CLI: 6.6.0, ORM: 6.31.1]

Loaded configuration file "config/config.json".
Using environment "development".
node:internal/crypto/hash:107
    throw new ERR_INVALID_ARG_TYPE(
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (3486)
    at new NodeError (node:internal/errors:405:5)
    at Hash.update (node:internal/crypto/hash:107:11)
    at NativePasswordAuth.encryptSha1Password (/home/keshav/Desktop/backend-sanket/Base-Node-Project-Template/node_modules/mariadb/lib/cmd/handshake/auth/native-password-auth.js:36:23)
    at Handshake.send (/home/keshav/Desktop/backend-sanket/Base-Node-Project-Template/node_modules/mariadb/lib/cmd/handshake/auth/handshake.js:102:40)
    at Handshake.parseHandshakeInit (/home/keshav/Desktop/backend-sanket/Base-Node-Project-Template/node_modules/mariadb/lib/cmd/handshake/auth/handshake.js:69:17)
    at Authentication.onPacketReceive (/home/keshav/Desktop/backend-sanket/Base-Node-Project-Template/node_modules/mariadb/lib/cmd/handshake/authentication.js:32:17)
    at PacketInputStream.receivePacketBasic (/home/keshav/Desktop/backend-sanket/Base-Node-Project-Template/node_modules/mariadb/lib/io/packet-input-stream.js:82:9)
    at PacketInputStream.onData (/home/keshav/Desktop/backend-sanket/Base-Node-Project-Template/node_modules/mariadb/lib/io/packet-input-stream.js:132:20)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v18.17.0
WikiRik commented 1 year ago

The code hasn't reached sequelize yet, and fails when it's still in the mariadb connector. Apart from that this error message does not provide us with enough information to determine what is wrong