The Netlify deploy errored, with the following guidance provided: ### Diagnosis: The build failed due to the following error: 1. Next.js couldn't resolve the 'tailwindcss' module in the directory '/opt/build/repo/src/styles'. ### Solution: 1. **Check Package**: Verify that the 'tailwindcss' package is listed in the `package.json` file or was committed to the repository. 2. **Install Package**: If the package is missing, add 'tailwindcss' to the dependencies in the `package.json` file and commit the changes to the repository. 3. **External Configuration**: If 'tailwindcss' is an external module that Next.js cannot resolve, consider adding 'tailwindcss' to the `external` configuration in Next.js. By ensuring 'tailwindcss' is in the `package.json` or committed to the repository, you should resolve the build failure related to the module resolution issue. The relevant error logs are: Line 141: ​ Line 142: Build command from Netlify app  Line 143: ──────────────────────────────────────────────────────────────── Line 144: ​ Line 145: $ pnpm run build Line 146: > drive-tutorial@0.1.0 build /opt/build/repo Line 147: > next build Line 148: ⚠ You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the pro Line 149: β–² Next.js 15.1.6 Line 150:   Creating an optimized production build ... Line 151: [Error: Can't resolve 'tailwindcss' in '/opt/build/repo/src/styles'] { details: "resolve 'tailwindcss' in '/opt/build/rep Line 152: ' Parsed request is a module\n' + Line 153: ' using description file: /opt/build/repo/package.json (relative path: ./src/styles)\n' + Line 154: ' resolve as module\n' + Line 155: " /opt/build/repo/src/styles/node_modules doesn't exist or is not a directory\n" + Line 156: " /opt/build/repo/src/node_modules doesn't exist or is not a directory\n" + Line 157: ' looking for modules in /opt/build/repo/node_modules\n' + Line 158: ' single file module\n' + Line 159: ' using description file: /opt/build/repo/package.json (relative path: ./node_modules/tailwindcss)\n' + Line 160: ' no extension\n' + Line 161: ' /opt/build/repo/node_modules/tailwindcss is not a file\n' + Line 187: " /opt/build/repo/node_modules/.pnpm/next@15.1.6_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/ Line 188: ' .css\n' + Line 189: " /opt/build/repo/node_modules/.pnpm/next@15.1.6_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/ Line 190: " /opt/build/repo/node_modules/.pnpm/next@15.1.6_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/d Line 191: } Line 192: βœ“ Compiled successfully Line 193:   Skipping validation of types Line 194:   Skipping linting Line 195:   Collecting page data ... Line 196:   Generating static pages (0/5) ... Line 197: Error: should not be imported outside of pages/_document. Line 198: Read more: https://nextjs.org/docs/messages/no-document-import-in-page Line 199: at y (.next/server/chunks/793.js:6:1263) Line 200: Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error Line 201: Error: should not be imported outside of pages/_document. Line 202: Read more: https://nextjs.org/docs/messages/no-document-import-in-page Line 203: at Y (/opt/build/repo/node_modules/.pnpm/next@15.1.6_react-dom@19.0.0_react@19.0.0__react@19.0.0/node_modules/next/dist/comp Line 204: at y (/opt/build/repo/.next/server/chunks/793.js:6:1263) Line 205: at react-stack-bottom-frame (/opt/build/repo/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/rea Line 206: at renderWithHooks (/opt/build/repo/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-se Line 207: at renderElement (/opt/build/repo/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-serv Line 208: at retryNode (/opt/build/repo/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-server.e Line 209: at renderNodeDestructive (/opt/build/repo/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react- Line 210: at renderElement (/opt/build/repo/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-serv Line 211: at retryNode (/opt/build/repo/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-server.e Line 212: at renderNodeDestructive (/opt/build/repo/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react- Line 213: Export encountered an error on /_error: /404, exiting the build. Line 214: β¨― Static worker exited with code: 1 and signal: null Line 215:  ELIFECYCLE  Command failed with exit code 1. Line 216: ​ Line 217: "build.command" failed  Line 218: ──────────────────────────────────────────────────────────────── Line 219: ​ Line 220: Error message Line 221: Command failed with exit code 1: pnpm run build Line 222: ​ Line 223: Error location Line 224: In Build command from Netlify app: Line 225: pnpm run build Line 226: ​ Line 227: Resolved config Line 228: build: Line 229: command: pnpm run build Line 230: commandOrigin: ui Line 231: environment: Line 232: - DATABASE_URL Line 233: - NODE_ENV Line 235: - SINGLESTORE_HOST Line 236: - SINGLESTORE_PASS Line 237: - SINGLESTORE_PORT Line 238: - SINGLESTORE_USER Line 239: publish: /opt/build/repo/.next Line 240: publishOrigin: ui Line 241: plugins: Line 242: - inputs: {} Line 243: origin: ui Line 244: package: '@netlify/plugin-nextjs' Line 245: Failed during stage 'building site': Build script returned non-zero exit code: 2 Line 246: Build failed due to a user error: Build script returned non-zero exit code: 2 Line 247: Failing build: Failed to build site Line 248: Finished processing build request in 52.314s