Upgrade shopify-api to the latest version

Topic summary

A developer is encountering errors after updating their custom Shopify app to API version 2024-07. The main issue occurs when attempting to update the REST API version—the app throws a “Cannot find module” error.

Current situation:

  • shopify-app package is at version 9.7.2, which doesn’t include support for 2024-07
  • Attempted updating all packages, but shopify-app remains at 9.7.2
  • Version 10.0 introduces 3 subdirectories (cjs, esm, ts), creating confusion about which to use

Open questions:

  • How to successfully upgrade to a version supporting 2024-07?
  • Which subdirectory format to choose in version 10.0?
  • Why doesn’t the Shopify CLI automatically update to the latest package version?

The issue remains unresolved, with the developer seeking guidance on the upgrade path.

Summarized with AI on November 6. AI used: claude-sonnet-4-5-20250929.

I have updated the version of my custom app to 2024-07. The only place I am still having issues is with updating the version for my rest api. If I change the version I am getting the below error when trying to run the app. If I go look at my current version for shopify-app it is 9.7.2. Looking through the code on their site I see that 2024-07 is not in this version. I have tried to update all of my packages, but it is still 9.7.2. Why doesn’t the Shopify CLI update to the latest version of this package?

Also, I did notice that from version 10.0 they now have 3 subdirectories (cjs, esm, ts). Which one do you choose if I am able to get the version upgraded?

Error: Cannot find module ‘@shopify/shopify-api/rest/admin/2024-07’