shopify-api-js
shopify-api-js copied to clipboard
Node React API Shopify App Installation
TypeError: Cannot read properties of undefined (reading 'map') at new AuthScopes (/var/www/html/productOptions/node_modules/@shopify/shopify-api/dist/auth/scopes/index.js:15:14) at AuthScopes.equals (/var/www/html/productOptions/node_modules/@shopify/shopify-api/dist/auth/scopes/index.js:40:21) at /var/www/html/productOptions/node_modules/@shopify/koa-shopify-auth/dist/src/verify-request/verify-token.js:24:79 at step (/var/www/html/productOptions/node_modules/tslib/tslib.js:133:27) at Object.next (/var/www/html/productOptions/node_modules/tslib/tslib.js:114:57) at fulfilled (/var/www/html/productOptions/node_modules/tslib/tslib.js:104:62) at processTicksAndRejections (node:internal/process/task_queues:96:5)
You'll probably need to provide a little more background/context than just a single error message.
@ShikhaPant did u find a fix ??, i'm having the same issue.
There's not a lot of context provided but it might be there aren't any scopes being provided to the Shopify.Context during initialization, or not provided in the correct format. It should be either a comma-separated string (e.g., 'read_products, write_products') or an array of strings (e.g., ['read_products', 'write_products']).
There's not a lot of context provided but it might be there aren't any scopes being provided to the
Shopify.Contextduring initialization, or not provided in the correct format. It should be either a comma-separated string (e.g.,'read_products, write_products') or an array of strings (e.g.,['read_products', 'write_products']).
mine are like this:

and this is my frontend error message & devtool console errors:

There's not enough information here, or background.
- how was the app created? (e.g. using the CLI, copying a template, ...?)
- are you using the Shopify CLI to run the app during development?
- for the console messages, what are the corresponding URLs, requests, responses that are causing those messages
- how/when does the error occur? please provide the steps that lead to this error.
For the given FE error message, what is the shop= parameter in the URL?
There's not enough information here, or background.
- how was the app created? (e.g. using the CLI, copying a template, ...?)
- are you using the Shopify CLI to run the app during development?
- for the console messages, what are the corresponding URLs, requests, responses that are causing those messages
- how/when does the error occur? please provide the steps that lead to this error.
For the given FE error message, what is the
shop=parameter in the URL?
- using the cli
- no the app is hosted by Heroku, production.
- when app first loads
the shop= parameter in the URL is the dev store i'm trying to test the app on
P.S: i'm using the old deprecated shopify app node template (next.js/koa.js)
This issue is stale because it has been open for 90 days with no activity. It will be closed if no further action occurs in 14 days.
@ismailalabou Will you be able to migrate to v6 of the this library? I believe it could help solving your problem. I will close this issue since you are using deprecated template. If it happens to you again with v6 of the shopify-api-js library, feel free to reopen this issue.