MONEI / Shopify-api-node

Node Shopify connector sponsored by MONEI
https://monei.com/shopify-payment-gateway/
MIT License
946 stars 278 forks source link

Cannot read property version of undefined #496

Closed pociej closed 2 years ago

pociej commented 3 years ago

I do this :

  const api = new Shopify({
    shopName: 'myshopify_domain',
    accessToken: 'accessToken',
    apiVersion: "2021-04",
  });

  const orders = await api.order.list({ limit: 10, status: "any" });

I throws :

TypeError: Cannot read property 'apiVersion' of undefined\n   
 at Order.buildUrl (/built_app/programs/server/npm/node_modules/shopify-api-node/mixins/base.js:100:30)\n    
at Order.list (/built_app/programs/server/npm/node_modules/shopify-api-node/mixins/base.js:70:22)\n    
at imports/api/collections/Upsells/server/methods.js:27:30\n   
at /built_app/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40

For make it more funny it depends on environment when i build project locally it works, on stage server above server is thrown. Im now looking for possible difference between env but this error shouldnt be thrown any way.

lpinca commented 3 years ago

How can shopify.options be undefined? Are you or one of your dependencies overriding it?

lpinca commented 2 years ago

I'm closing this due to inactivity.