Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Request Failed #1041

Closed
muhammad-hunnain786 opened this issue Sep 15, 2022 · 3 comments
Closed

API Request Failed #1041

muhammad-hunnain786 opened this issue Sep 15, 2022 · 3 comments

Comments

@muhammad-hunnain786
Copy link

Issue summary

iam making the shopify app using shopify cli 3.0. all goes well but after installation, the app get crash because of failed api call

i have checked the logs its returning error following error

Cannot find module '/var/task/node_modules/@shopify/shopify-api/dist/rest-resources/2022-07/index.js

as in api we are calling this

const { Product } = await import(
@shopify/shopify-api/dist/rest-resources/${Shopify.Context.API_VERSION}/index.js
);

const countData = await Product.count({ session });
res.status(200).send(countData);

Expected behavior

it should get get the product object and return me the count for of my products

Specifications

  • Browser: chrome
  • Device: dell
  • Operating System: windows 11
@mkevinosullivan
Copy link
Contributor

@muhammad-hunnain786 I'm unable to reproduce this.

Can you share the list of commands you're using to create/run the app? e.g.,

npm init @shopify/app@latest
cd <app name>
npm run dev

Also:

  • what directory/folder are you in when you start these commands? (I ask because /var/task seems unusual)
  • Can you share the output that you see when the error occurs, please?

@github-actions
Copy link

We are closing this issue because we did not hear back regarding additional details we needed to resolve this issue. If the issue persists and you are able to provide the missing clarification we need, feel free to respond and reopen this issue.

We appreciate your understanding as we try to manage our number of open issues.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2022
@ishefi
Copy link

ishefi commented Dec 20, 2023

Happened to me as well, after upgrading from @shopify/app 3.47.3 to 3.49.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants