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

Node 14 support - ERR_INVALID_ARG_TYPE error #21

Closed
Kostanos opened this issue Nov 26, 2020 · 3 comments
Closed

Node 14 support - ERR_INVALID_ARG_TYPE error #21

Kostanos opened this issue Nov 26, 2020 · 3 comments

Comments

@Kostanos
Copy link

The is the error on node 14 (possible also in node 12):

# postgrator 6 --host myhost --database mydb --username myuser --password mypass
buffer.js:728
    throw new ERR_INVALID_ARG_TYPE(
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Object
    at Function.byteLength (buffer.js:728:11)
    at Writer.addCString (/usr/local/lib/node_modules/pg/node_modules/pg-protocol/dist/buffer-writer.js:41:30)
    at Object.startup (/usr/local/lib/node_modules/pg/node_modules/pg-protocol/dist/serializer.js:9:32)
    at Connection.startup (/usr/local/lib/node_modules/pg/lib/connection.js:124:33)
    at Connection.<anonymous> (/usr/local/lib/node_modules/pg/lib/client.js:121:13)
    at Connection.emit (events.js:315:20)
    at Socket.<anonymous> (/usr/local/lib/node_modules/pg/lib/connection.js:45:12)
    at Object.onceWrapper (events.js:421:28)
    at Socket.emit (events.js:327:22)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1132:10) {
  code: 'ERR_INVALID_ARG_TYPE'
}

# nodejs -v
v14.15.0

Possible issuer related to the one mentioned here: https://stackoverflow.com/a/62606989/2215679

@djmitchella
Copy link

I hit the same thing -- explicitly using [email protected] fixed it for me.

@perrin4869
Copy link
Collaborator

In case you are interested, this is fixed in my fork perrin4869/postgrator-cli.

@perrin4869
Copy link
Collaborator

Fixed in #30

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

3 participants