Skip to content

RequestError: The "listener" argument must be of type function error when upgrading #657

Open
@pbrink231

Description

@pbrink231

I am upgrading from V2.25.1, I have no issues with this version. I didn't change any code. the call that is throwing an error is shopify.order.count()

I am trying to upgrade to V3.13.2 but this error is with any V3 version starting with V3.0.0

It seems this error is coming from the got package. I don't use any events at the moment so no .on() calls on the Shopify instance. The error message seems related to event emitter from searching.

I am on node version 20.11.0

I have removed the node_modules folder and reinstalled after the update but that did not solve the issue. Tried tracking it down more but could not figure out what was going on. The object Shopify package is calling to the got package looks fine. I am thinking there is some .on() somewhere in the Shopify package that is an issue?

RequestError: The "listener" argument must be of type function. Received an instance of Object
at Request._makeRequest (C:\Users\beast\programs\crm-server\node_modules\got\dist\source\core\index.js:1183:19)
at C:\Users\beast\programs\crm-server\node_modules\got\dist\source\core\index.js:334:28
at checkListener (node:events:275:3)
at ClientRequest.once (node:events:652:3)
at new ClientRequest (node:_http_client:239:10)
at Object.request (node:https:378:10)
at Object. (C:\Users\beast\programs\crm-server\node_modules\agent-base\patch-core.js:23:20)
at C:\Users\beast\programs\crm-server\node_modules\https-proxy-agent\node_modules\agent-base\patch-core.js:25:22
at Request._makeRequest (C:\Users\beast\programs\crm-server\node_modules\got\dist\source\core\index.js:1130:43)
at C:\Users\beast\programs\crm-server\node_modules\got\dist\source\core\index.js:334:28
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 'ERR_INVALID_ARG_TYPE',
timings: undefined
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions