Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on running db: migrate with Node 18.17.9 #1347

Open
alpha951 opened this issue Jul 18, 2023 · 1 comment
Open

Error on running db: migrate with Node 18.17.9 #1347

alpha951 opened this issue Jul 18, 2023 · 1 comment

Comments

@alpha951
Copy link

> 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
Copy link
Member

WikiRik commented Jul 18, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants