Shopify / shopify-app-template-remix

374 stars 151 forks source link

[shopify-api/WARNING] Loading REST resources for API version 2024-04, which doesn't match the default 2024-07 #857

Closed Stephnn0 closed 1 month ago

Stephnn0 commented 1 month ago

I'm using the LATEST_API_VERSION when running my remix app and I get the warning in logs that [shopify-api/WARNING] Loading REST resources for API version 2024-04, which doesn't match the default 2024-07

I get this warning either in a development environment or production after i compiler my project.

i already try to upgrade my packages since i saw i similar issue in the express stack but i didn't work.

const shopify = shopifyApp({
  apiVersion: LATEST_API_VERSION,
});
export default shopify;`
export const apiVersion = LATEST_API_VERSION

My shopify server is using LATEST_API_VERSION and i already checked in my shopify partners the api version is the lastest.

"@shopify/shopify-api": "11.3.0",
"@shopify/shopify-app-remix": "3.2.0",
"@shopify/shopify-app-session-storage-prisma": "5.1.1"
imrostom commented 1 month ago
import { restResources } from "@shopify/shopify-api/rest/admin/2024-07";
import prisma from "./db.server";

const shopify = shopifyApp({
  apiKey: process.env.SHOPIFY_API_KEY,
  apiSecretKey: process.env.SHOPIFY_API_SECRET || "",
  apiVersion: ApiVersion.July24,
  scopes: process.env.SCOPES?.split(","),
  appUrl: process.env.SHOPIFY_APP_URL || "",
  authPathPrefix: "/auth",
  sessionStorage: new PrismaSessionStorage(prisma),
  distribution: AppDistribution.AppStore,
  restResources,
  future: {
    unstable_newEmbeddedAuthStrategy: true,
  },
  ...(process.env.SHOP_CUSTOM_DOMAIN
    ? { customShopDomains: [process.env.SHOP_CUSTOM_DOMAIN] }
    : {}),
});

can you please check from which module restResources import in shopify.server.js file

Stephnn0 commented 1 month ago

After checking the restResources import i was using the wrong version, thanks man @imrostom