Example of package.json

Here's an example of a typical package.json file for a modern Next.js project:

{
 "name": "beswib",
 "version": "1.0.4",
 "private": true,
 "scripts": {
  "dev": "next dev --turbopack",
  "build": "next build",
  "lint": "eslint .",
  "prettier": "prettier --write .",
  "tsc:watch": "tsc --noEmit --watch",
  "test": "vitest"
 },
 "dependencies": {
  "@c15t/nextjs": "1.6.1",
  "@clerk/localizations": "3.25.3",
  "@clerk/nextjs": "6.32.2",
  "@clerk/themes": "2.4.21",
  "@faker-js/faker": "10.0.0",
  "@formatjs/intl-localematcher": "0.6.1",
  "@headlessui/react": "2.2.8",
  "@heroicons/react": "2.2.0",
  "@hookform/resolvers": "5.2.2",
  "@next/eslint-plugin-next": "15.5.3",
  "@next/third-parties": "15.5.3",
  "three": "0.180.0",
  "valibot": "1.1.0",
  "zustand": "5.0.8"
 },
 "devDependencies": {
  "@clerk/types": "4.86.0",
  "@eslint/eslintrc": "3.3.1",
  "@tailwindcss/postcss": "4.1.13",
  "@types/node": "24.5.2",
  "@types/react": "19.1.13",
  "tailwindcss": "4.1.13",
  "tw-animate-css": "1.3.8",
  "typescript": "5.9.2",
  "vitest": "3.2.4"
 }
}

Explanation of Sections

Project Metadata

  • name: Project name
  • version: Project version
  • private: Indicates that the package should not be published on npm

Scripts

Scripts define the commands available with npm run:

  • dev: Launches the development server with Turbopack
  • build: Compiles the project for production
  • lint: Checks the code with ESLint
  • prettier: Formats the code with Prettier
  • tsc:watch: Watches for TypeScript errors
  • test: Runs tests with Vitest

Dependencies

Production dependencies required for the application to function:

  • Frameworks and main libraries (Next.js, React, etc.)
  • Authentication (Clerk)
  • UI Components (Headless UI, Heroicons)
  • Validation (Valibot)
  • State management (Zustand)
  • 3D (Three.js)

DevDependencies

Development dependencies used only during development:

  • TypeScript types
  • Linting and formatting tools
  • CSS framework (Tailwind)
  • Tests (Vitest)