Intergrate partytown in Shopify Hydrogen

hi team,
We have deployed shopify hydrogen from github: GitHub - netlify/hydrogen-netlify-starter: Get started with Hydrogen on Netlify

Everything good. https://hydrogen-merkle.netlify.app/
But then we installed the partytown plugin from this tutorial: Shopify Hydrogen - Partytown
We have the check deploy log without any errors. However, the error is detected in the console log.
“TypeError: Failed to register a ServiceWorker for scope (‘https://hydrogen-merkle.netlify.app/~partytown/debug/’) with script (‘https://hydrogen-merkle.netlify.app/~partytown/ debug/partytown-sw.js’): A bad HTTP response code (404) was received when fetching the script”

Package.json

{
  "name": "hydrogen-netlify-starter",
  "description": "Demo store template for @shopify/hydrogen",
  "version": "0.0.0",
  "license": "MIT",
  "private": true,
  "engines": {
    "node": ">=16.14.0"
  },
  "scripts": {
    "dev": "npm run partytown && shopify hydrogen dev",
    "build": "npm run partytown && shopify hydrogen build",
    "partytown": "partytown copylib public/~partytown",
    "preview": "shopify hydrogen preview",
    "lint": "eslint --ext .js,.jsx,.ts,.tsx src",
    "lint-ts": "tsc --noEmit",
    "test": "WATCH=true vitest",
    "test:ci": "yarn build -t node && vitest run"
  },
  "devDependencies": {
    "@netlify/hydrogen-platform": "^1.1.2",
    "@shopify/cli": "3.15.0",
    "@shopify/cli-hydrogen": "3.15.0",
    "@shopify/prettier-config": "^1.1.2",
    "@tailwindcss/forms": "^0.5.2",
    "@tailwindcss/typography": "^0.5.2",
    "eslint": "^8.18.0",
    "eslint-plugin-hydrogen": "^0.12.2",
    "playwright": "^1.22.2",
    "postcss": "^8.4.14",
    "postcss-import": "^14.1.0",
    "postcss-preset-env": "^7.6.0",
    "prettier": "^2.3.2",
    "tailwindcss": "^3.0.24",
    "vite": "^2.9.13",
    "vitest": "^0.15.2"
  },
  "prettier": "@shopify/prettier-config",
  "dependencies": {
    "@builder.io/partytown": "^0.7.3",
    "@headlessui/react": "^1.7.0",
    "@shopify/hydrogen": "^1.4.3",
    "clsx": "^1.1.1",
    "graphql-tag": "^2.12.6",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-use": "^17.4.0",
    "typographic-base": "^1.0.4"
  },
  "author": "matt"
}

Hi @haunguyenlxag,

I understand you’re having issues, but please do not open threads on multiple platforms about the same thing. This is the 3rd thread I’m seeing about the same issue. This slows us down.

We will follow-up in the helpdesk when we have more information.

1 Like

ok thank you very much