Skip to content

API Request Failed #124

@muhammad-hunnain786

Description

@muhammad-hunnain786

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions