Re: Could not resolve dependency polaris

Solved

How can I resolve the polaris dependency error while installing discount-app-components?

timd
Shopify Partner
124 6 78

I'm trying to install @Shopify/discount-app-components in an app following this tutorial https://shopify.dev/docs/apps/selling-strategies/discounts/experience/ui#what-youll-learn (step 2) but I'm receiving an error that the wrong version of polaris is installed (10.49.1) (requires 11.2.2).

I'm not sure if the error is within my app or the discount-app-components package or how I upgrade the app to polaris 11.2.2

timd_0-1690319388280.png

 

Accepted Solution (1)

timd
Shopify Partner
124 6 78

This is an accepted solution.

Solved, I had to update react and polaris within the /web/frontend directory of the app this the following commands:

npm install react@latest react-dom@latest
npm install @Shopify/polaris@^11.2.2
npm install @Shopify/discount-app-components

View solution in original post

Reply 1 (1)

timd
Shopify Partner
124 6 78

This is an accepted solution.

Solved, I had to update react and polaris within the /web/frontend directory of the app this the following commands:

npm install react@latest react-dom@latest
npm install @Shopify/polaris@^11.2.2
npm install @Shopify/discount-app-components