shopify-api-js icon indicating copy to clipboard operation
shopify-api-js copied to clipboard

[getting started] Named export 'AuthQuery' not found

Open mariusa opened this issue 4 years ago • 0 comments

Issue summary

Follow the steps at https://github.com/Shopify/shopify-node-api/blob/main/docs/getting_started.md#set-up-context with an ESM app on node 16

package.json

    "type": "module",

1st issue: the correct import should be

import { Shopify, ApiVersion, AuthQuery } from '@shopify/shopify-api'

2nd issue:

Actual behavior

import { Shopify, ApiVersion, AuthQuery } from '@shopify/shopify-api'
                                             ^^^^^^^^^
SyntaxError: Named export 'AuthQuery' not found. The requested module '@shopify/shopify-api' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

Checklist

  • [x] I have described this issue in a way that is actionable (if possible)

mariusa avatar Dec 29 '21 11:12 mariusa