Shopify / shopify-app-template-php

280 stars 90 forks source link

Frontend directory is pointing to an outdated version of the frontend template repository #446

Open sergiocasao opened 1 year ago

sergiocasao commented 1 year ago

Issue summary

When trying to use some components from Polaris I got an error

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/@shopify_polaris.js?v=4fb69a76' does not provide an export named 'Text'

After looking I noticed some of the frontend node dependencies are outdated.

"dependencies": {
    "@shopify/app-bridge": "^3.1.0", // 3.7.7 available
    "@shopify/app-bridge-react": "^3.1.0", // 3.7.7 available
    "@shopify/app-bridge-utils": "^3.1.0", // 3.7.7 available
    "@shopify/polaris": "^9.11.0", // 10.49.1 available
    "@vitejs/plugin-react": "1.2.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-query": "^3.34.19",
    "react-router-dom": "^6.3.0",
    "vite": "^2.8.6" // 4.3.9 available
  },

I realized the frontend directory is pointing to an outdated version of the frontend template repository frontend @ f720a83

Updating the frontend directory and installing the dependencies again fix the issue.