Shopify / shopify-app-template-node

MIT License
860 stars 393 forks source link

pnpm template breaks when running `pnpm dev` command #1323

Closed apo1798 closed 4 months ago

apo1798 commented 4 months ago

Issue summary

After cloning the pnpm template, running pnpm dev and live preview in the store, the application crashed.

The error output seems to be from the @shopify/polaris-icons package. List one below

13:03:32 │ web-frontend │   VITE v4.5.2  ready in 231 ms
13:03:32 │ web-frontend │
13:03:32 │ web-frontend │   ➜  Local:   http://localhost:64179/
13:03:32 │ web-backend  │ [shopify-api/WARNING] Loading REST resources for API version 2023-04, which doesn't match the default 2023-07
13:03:32 │ web-backend  │ [shopify-api/INFO] version 7.7.0, environment Node v20.10.0
13:03:32 │ web-frontend │ ✘ [ERROR] No matching export in "../../node_modules/@shopify/polaris-icons/dist/index.mjs" for import "CaretDownMinor"
13:03:32 │ web-frontend │
13:03:32 │ web-frontend │     node_modules/@shopify/polaris/build/esm/components/Button/Button.js:2:9:
13:03:32 │ web-frontend │       2 │ import { CaretDownMinor, SelectMinor, CaretUpMinor } from '@shopify...
13:03:32 │ web-frontend │         ╵          ~~~~~~~~~~~~~~
13:03:32 │ web-frontend │

Expected behavior

The development server runs without any errors or warnings.

Actual behavior

The app crashed.

Steps to reproduce the problem

  1. pnpm create @shopify/app@latest --template=node
  2. pnpm dev
amazing-chicken commented 4 months ago

@apo1798 Try upgrading polaris version.

apo1798 commented 4 months ago

@amazing-chicken After installing the lastest @shopify/polaris, the errors are resolved. Thanks for your help!