Shopify-api-node: TypeError: Object.defineProperties called on a non-object

I haven’t started digging into the shopify-api-node/index.js:158 location yet, but just making an issue thread so when I debug we have a place to find the answer.

Mar 15 17:20:54 real-id app/web.4 TypeError: Object.defineProperties called on non-object
Mar 15 17:20:54 real-id app/web.4     at Function.defineProperties (<anonymous>)
Mar 15 17:20:54 real-id app/web.4     at /app/node_modules/shopify-api-node/index.js:158:18
Mar 15 17:20:54 real-id app/web.4     at runMicrotasks (<anonymous>)
Mar 15 17:20:54 real-id app/web.4     at processTicksAndRejections (internal/process/task_queues.js:93:5)
Mar 15 17:20:54 real-id app/web.4     at async createCheckForOrder (/app/.next/server/pages/api/orders/create-check.js:284:17)
Mar 15 17:20:54 real-id app/web.4     at async /app/.next/server/pages/api/webhooks/shop/order.js:926:14
Mar 15 17:20:54 real-id app/web.4     at async apiResolver (/app/node_modules/next/dist/next-server/server/api-utils.js:8:1)
Mar 15 17:20:54 real-id app/web.4     at async Server.handleApiRequest (/app/node_modules/next/dist/next-server/server/next-server.js:62:403)
Mar 15 17:20:54 real-id app/web.4     at async Object.fn (/app/node_modules/next/dist/next-server/server/next-server.js:54:176)
Mar 15 17:20:54 real-id app/web.4     at async Router.execute (/app/node_modules/next/dist/next-server/server/router.js:23:67)
Mar 15 17:20:54 real-id app/web.4     at async Server.run (/app/node_modules/next/dist/next-server/server/next-server.js:63:656)
Mar 15 17:20:54 real-id app/web.4     at async Server.handleRequest (/app/node_modules/next/dist/next-server/server/next-server.js:33:242)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16

Most upvoted comments

Whatever.

@panoply this cannot be caused by dynamic requires. Make sure you are actually calling the methods with the correct arguments. For example, shopify.<resource>.get(null) can cause this error.