Next.js Discord

Discord Forum

Failed to build

Unanswered
Plummer Terrier posted this in #help-forum
Open in Discord
Plummer TerrierOP
I just added new packages like prisma and bcrypt to my project, and it works fine on the development, but when I try to build, it throws an error like this:

3 Replies

Plummer TerrierOP
here's the package.json:
{
  "name": "pasar",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "npx prisma generate && next build",
    "start": "next start",
    "lint": "next lint",
    "postinstall": "npx prisma generate"
  },
  "dependencies": {
    "@auth/prisma-adapter": "^2.9.1",
    "@hookform/resolvers": "^5.1.0",
    "@prisma/client": "^6.9.0",
    "@prisma/extension-accelerate": "^2.0.1",
    "@radix-ui/react-accordion": "^1.2.10",
    "@radix-ui/react-avatar": "^1.1.9",
    "@radix-ui/react-checkbox": "^1.3.1",
    "@radix-ui/react-dropdown-menu": "^2.1.15",
    "@radix-ui/react-label": "^2.1.7",
    "@radix-ui/react-navigation-menu": "^1.2.12",
    "@radix-ui/react-select": "^2.2.4",
    "@radix-ui/react-slot": "^1.2.3",
    "@radix-ui/themes": "^3.2.1",
    "bcrypt": "^6.0.0",
    "class-variance-authority": "^0.7.1",
    "clsx": "^2.1.1",
    "lucide-react": "^0.510.0",
    "motion": "^12.11.3",
    "next": "15.3.2",
    "next-auth": "^4.24.11",
    "next-themes": "^0.4.6",
    "react": "^19.0.0",
    "react-dom": "^19.0.0",
    "react-hook-form": "^7.57.0",
    "react-icons": "^5.5.0",
    "react-responsive": "^10.0.1",
    "sonner": "^2.0.5",
    "tailwind-merge": "^3.3.0",
    "use-debounce": "^10.0.4",
    "zod": "^3.25.56"
  },
  "devDependencies": {
    "@eslint/eslintrc": "^3",
    "@tailwindcss/postcss": "^4",
    "@types/bcrypt": "^5.0.2",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "15.3.2",
    "prettier": "^3.5.3",
    "prettier-plugin-tailwindcss": "^0.6.11",
    "tailwindcss": "^4",
    "tw-animate-css": "^1.2.9",
    "typescript": "^5"
  }
}
It also works fine on my co-worker's environment
Plummer TerrierOP
And I have already searched for the error on Google, and it says that I have to terminate the current development process in the terminal. However, after trying it, it does the same.