Skip to content

Can't use the discount sample app #342

@WakilEfoli

Description

@WakilEfoli

I cloning the discount-sample-app using the following command as per Shopify's documentation:

npm init @shopify/app@latest -- --template https://github.com/Shopify/function-examples/sample-apps/discounts

But the command failed with the following errors:


── external error ──────────────────────────────────────────────────────────────

Error coming from `npm install`

Command failed with exit code 1: npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: sample-apps-discounts@undefined
npm ERR! Found: @shopify/polaris@11.19.0
npm ERR! node_modules/@shopify/polaris
npm ERR!   @shopify/polaris@"^11.1.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @shopify/polaris@"^12.0.0-beta.0" from @shopify/discount-app-components@1.3.0
npm ERR! node_modules/@shopify/discount-app-components
npm ERR!   @shopify/discount-app-components@"^1.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\IT\AppData\Local\npm-cache\_logs\2023-09-18T07_12_51_513Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\IT\AppData\Local\npm-cache\_logs\2023-09-18T07_12_51_513Z-debug-0.log

────────────────────────────────────────────────────────────────────────────────

npm ERR! code 1
npm ERR! path C:\xampp\htdocs\work\shopify\discountExperience
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c create-app --template https://github.com/Shopify/function-examples/sample-apps/discounts

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\IT\AppData\Local\npm-cache\_logs\2023-09-18T07_11_54_882Z-debug-0.log

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions