HookWebpackError: Cannot read properties of undefined (reading ‘0’)

Can somebody tell me why am I having this issue while running pnpm run build. This is a Next.js project.

My package.json:

{
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "@icons-pack/react-simple-icons": "^9.5.0",
    "@tailwindcss/postcss": "4.0.0-alpha.13",
    "@types/node": "20.11.17",
    "@types/react": "18.2.55",
    "@types/react-dom": "18.2.19",
    "@vercel/analytics": "^1.1.3",
    "@vercel/speed-insights": "^1.0.9",
    "framer-motion": "^11.2.10",
    "geist": "^1.3.0",
    "lucide-react": "^0.394.0",
    "next": "14.2.0-canary.62",
    "next-mdx-remote": "^4.4.1",
    "postcss": "^8.4.35",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "rehype-pretty-code": "^0.13.2",
    "remark-gfm": "3.0.1",
    "shiki": "^1.6.4",
    "sugar-high": "^0.6.0",
    "tailwindcss": "4.0.0-alpha.13",
    "typescript": "5.3.3"
  }
}

Error I’m having while running the build script. Dev script is working fine.

Creating an optimized production build ...
Failed to compile.

HookWebpackError: Cannot read properties of undefined (reading '0')
    at makeWebpackError (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/webpack/bundle5.js:28:312635)
    at /Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/webpack/bundle5.js:28:106060
    at eval (eval at create (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/webpack/bundle5.js:13:28858), <anonymous>:44:1)
-- inner error --
TypeError: Cannot read properties of undefined (reading '0')
    at /Users/sintuboro/Desktop/boroblog/static/css/fab7be39e746a489.css:2:32011
    at Parser.attribute (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:79568)
    at Parser.parse (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:93417)
    at Parser.loop (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:93089)
    at new Parser (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:79163)
    at Processor._root (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:96105)
    at Processor._runSync (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:96612)
    at Processor.processSync (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:97367)
    at /Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:36530
    at Array.every (<anonymous>)
    at ensureCompatibility (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:35918)
caused by plugins in Compilation.hooks.processAssets
TypeError: Cannot read properties of undefined (reading '0')
    at /Users/sintuboro/Desktop/boroblog/static/css/fab7be39e746a489.css:2:32011
    at Parser.attribute (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:79568)
    at Parser.parse (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:93417)
    at Parser.loop (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:93089)
    at new Parser (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:79163)
    at Processor._root (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:96105)
    at Processor._runSync (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:96612)
    at Processor.processSync (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:97367)
    at /Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:36530
    at Array.every (<anonymous>)
    at ensureCompatibility (/Users/sintuboro/Desktop/boroblog/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/cssnano-simple/index.js:190:35918)


> Build failed because of webpack errors

I have gone through all the directories to see what I’m missing but doesn’t look like any of my project files has issues. Not sure why the build is not working.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật