oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.51k stars 2.71k forks source link

PWA App Production Build Failure on Vercel (Works on Yarn) #10113

Open anishwij opened 5 months ago

anishwij commented 5 months ago

What version of Bun is running?

1.1.0+5903a6141

What platform is your computer?

Darwin 23.2.0 arm64 arm

What steps can reproduce the bug?

Unsure, but when I tried to build my PWA web app on vercel for a production build workbox-window had errors. (see image for errors)

My package.json:

{
  "name": "r3f-vite-starter",
  "private": true,
  "version": "1.0.0",
  "type": "module",
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },
  "dependencies": {
    "@react-three/drei": "9.99.7",
    "@react-three/fiber": "^8.15.12",
    "@react-three/postprocessing": "^2.16.2",
    "@types/three": "0.162.0",
    "framer-motion": "^11.0.8",
    "framer-motion-3d": "^11.0.8",
    "gsap": "^3.12.5",
    "jotai": "^2.5.0",
    "lamina": "^1.1.23",
    "leva": "^0.9.35",
    "localforage": "^1.10.0",
    "maath": "^0.10.7",
    "match-sorter": "^6.3.4",
    "playroomkit": "^0.0.69",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-router-dom": "^6.22.3",
    "sort-by": "^0.0.2",
    "three": "0.162.0",
    "three-stdlib": "^2.28.5",
    "vite-plugin-glsl": "^1.2.0",
    "vite-plugin-pwa": "^0.19.8",
    "workbox-window": "^7.0.0",
    "zustand": "^4.4.6"
  },
  "devDependencies": {
    "@vitejs/plugin-react": "^4.2.1",
    "autoprefixer": "^10.4.16",
    "eslint-config-prettier": "^9.0.0",
    "postcss": "^8.4.31",
    "prettier": "^3.0.3",
    "prettier-plugin-tailwindcss": "^0.5.6",
    "tailwindcss": "^3.3.5",
    "vite": "^5.1.5"
  }
}

What is the expected behavior?

For my deployment to succeed

What do you see instead?

The error coming from workbox-window

CS_005852 2024-04

Additional information

I tried the deployment with Yarn, and it worked. So definitely a Bun issue here.

github-actions[bot] commented 1 month ago

This issue is stale and may be closed due to inactivity. If you're still running into this, please leave a comment.