Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Error on running db: migrate with Node 18.17.9

Open
#1,347 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, mariadb, node.js
Domain
cli, databases

Research direction

Start by reproducing npx sequelize-cli db:migrate with the reported Node.js version and inspect the MariaDB authentication path shown in node_modules/mariadb/lib/cmd/handshake/auth/native-password-auth.js. Done means the migration command no longer raises ERR_INVALID_ARG_TYPE during the database handshake.

Written by the indexing model from the issue text.

Description

> 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
Dominant language
JavaScript
Stars
2.6k
Forks
524
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sequelize/cli

All issues in sequelize/cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.