TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function

See original GitHub issue

When i’m trying a simple example I’m getting the following error log:

internal/util.js:214
    throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at Object.promisify (internal/util.js:214:11)
    at Object.<anonymous> (/Users/thomasverleye/Sites/personal/kerckstede/orders/node_modules/got/dist/source/get-response.js:8:25)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/thomasverleye/Sites/personal/kerckstede/orders/node_modules/got/dist/source/request-as-event-emitter.js:13:24)

Here’s the source-code I’ve been trying to use:

const Shopify = require('shopify-api-node');

const shopify = new Shopify({
  shopName: 'REDACTED',
  apiKey: 'REDACTED',
  password: 'REDACTED'
});

shopify.order
  .list({ limit: 5 })
  .then((orders) => console.log(orders))
  .catch((err) => console.error(err));

My Setup: Node Version: v8.13.0 NPM Version: 6.4.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
lpincacommented, Jan 20, 2020

Node.js 8 is no longer supported. shopify-api-node@3 requires Node.js >= 10.

0reactions
tomarderncommented, Mar 1, 2020

Just ran into this issue myself - I was trying to deploy to Google Cloud Functions / Firebase.

Please can you add that node 10 is required in the readme?

Read more comments on GitHub >

github_iconTop Results From Across the Web

The "original" argument must be of type Function. Received ...
In the following code, I get this error: TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must ...
Read more >
TypeError: The "original" argument must be of type Function ...
Get error on import {Issuer} from 'openid-client'; TypeError: The "original" argument must be of type Function promisify GoogleApi.
Read more >
typeerror [err_invalid_arg_type]: the "data" argument must be ...
I receive this error: UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, ...
Read more >
The "original" argument must be of type Function. Received ...
Coding example for the question OKTA express middleware - TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type Function.
Read more >
The "url" argument must be of type string. Received undefined ...
The error says, provided url argument has a non-string value so make sure by printing/consol the url property has the correct value or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found