Next.js Discord

Discord Forum

Vercel Build Error

Unanswered
! nolikas posted this in #help-forum
Open in Discord
What is wrong with my Vercel build? I can change whatever I want but I keep getting this error...

5 Replies

Cloning completed: 393.689ms
Running "vercel build"
Vercel CLI 33.0.1
Installing dependencies...
added 333 packages in 10s
117 packages are looking for funding
  run `npm fund` for details
Detected Next.js version: 14.0.4
Running "npm install && next build"
up to date, audited 24 packages in 856ms
3 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry
   â–² Next.js 14.0.4
   Creating an optimized production build ...
Failed to compile.
app/layout.tsx
An error occured in `next/font`.
Error: Cannot find module 'tailwindcss'
Require stack:
- /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js
- /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/index.js
- /vercel/path0/node_modules/next/dist/build/webpack/config/index.js
- /vercel/path0/node_modules/next/dist/build/webpack-config.js
- /vercel/path0/node_modules/next/dist/build/webpack/plugins/next-trace-entrypoints-plugin.js
- /vercel/path0/node_modules/next/dist/build/collect-build-traces.js
- /vercel/path0/node_modules/next/dist/build/index.js
- /vercel/path0/node_modules/next/dist/cli/next-build.js
- /vercel/path0/node_modules/next/dist/lib/commands.js
- /vercel/path0/node_modules/next/dist/bin/next
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at /vercel/path0/node_modules/next/dist/server/require-hook.js:55:36
    at Function.resolve (node:internal/modules/cjs/helpers:125:19)
    at loadPlugin (/vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:49:32)
    at /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:157:56
    at Array.map (<anonymous>)
    at getPostCssPlugins (/vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:157:47)
    at async /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/index.js:124:36
    at async /vercel/path0/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js:86:33
    at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:147:20)
./app/Mines.tsx
Module not found: Can't resolve 'react-icons/tb'
https://nextjs.org/docs/messages/module-not-found
./app/Mines.tsx
Module not found: Can't resolve 'react-icons/fa6'
https://nextjs.org/docs/messages/module-not-found
./app/Mines.tsx
Module not found: Can't resolve 'react-icons/bs'
https://nextjs.org/docs/messages/module-not-found
./app/Mines.tsx
Module not found: Can't resolve 'crypto-js'
https://nextjs.org/docs/messages/module-not-found
> Build failed because of webpack errors
Error: Command "npm install && next build" exited with 1
My package.json file:
{
  "name": "mineslt",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev --turbo",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "react": "^18",
    "react-dom": "^18",
    "next": "14.0.4"
  },
  "devDependencies": {
    "typescript": "^5",
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "autoprefixer": "^10.0.1",
    "postcss": "^8",
    "tailwindcss": "^3.3.0",
    "eslint": "^8",
    "eslint-config-next": "14.0.4"
  }
}
Oh it's missing crypto-js and react-icons
But still the tailwind error..
Already tried deleting node_modules, .next and package-lock.json