Here’s what you need to do:
-
Issue: The problem arises because you’re using react@18.2.0, while the Shopify package relies on an older version.
-
Solution: To resolve this, you can utilize the legacy-peer-deps option.
-
Steps:
-
Create a file named .npmrc in the root directory of your project (where the package.json file is located).
-
Inside the .npmrc file, add the following line:
legacy-peer-deps=true
This setting will help address the compatibility issue between the different package versions.

-