Build Failed

Hey,
I’m new to React and while trying to build my Website on Vercel I ran into this error. When i run the build locally via “npm run dev &” it works and i can see my build on localhost:3000. When I try it on Vercel get the following Error Message. I also tried to build it locally with “vercel build” and I get the same result.

[13:31:00.202] Running build in Washington, D.C., USA (East) – iad1
[13:31:00.327] Cloning github.com/ArwinJa/DMWT (Branch: main, Commit: a23cace)
[13:31:00.343] Skipping build cache, deployment was triggered without cache.
[13:31:00.672] Cloning completed: 343.895ms
[13:31:00.936] Running "vercel build"
[13:31:02.372] Vercel CLI 39.2.0
[13:31:02.748] Warning: Detected "engines": { "node": ">=18" } in your `package.json` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version
[13:31:02.756] Installing dependencies...
[13:31:10.315] 
[13:31:10.315] added 40 packages in 7s
[13:31:10.316] 
[13:31:10.316] 8 packages are looking for funding
[13:31:10.316]   run `npm fund` for details
[13:31:10.334] Detected Next.js version: 15.1.0
[13:31:10.337] Running "npm run build"
[13:31:10.471] 
[13:31:10.471] > build
[13:31:10.471] > next build
[13:31:10.471] 
[13:31:11.149] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[13:31:11.149] This information is used to shape Next.js' roadmap and prioritize features.
[13:31:11.149] 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:
[13:31:11.150] https://nextjs.org/telemetry
[13:31:11.150] 
[13:31:11.263]    ▲ Next.js 15.1.0
[13:31:11.263] 
[13:31:11.265]    Linting and checking validity of types ...
[13:31:11.366]    Creating an optimized production build ...
[13:31:15.696] (node:255) [DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API
[13:31:15.696] (Use `node --trace-deprecation ...` to show where the warning was created)
[13:31:17.416] Failed to compile.
[13:31:17.416] 
[13:31:17.416] ./styles/global.css
[13:31:17.417] Global CSS cannot be imported from files other than your Custom <App>. Due to the Global nature of stylesheets, and to avoid conflicts, Please move all first-party global CSS imports to pages/_app.js. Or convert the import to Component-Level CSS (CSS Modules).
[13:31:17.417] Read more: https://nextjs.org/docs/messages/css-global
[13:31:17.417] Location: pages/App.js
[13:31:17.417] 
[13:31:17.417] Import trace for requested module:
[13:31:17.417] ./styles/global.css
[13:31:17.417] 
[13:31:17.417] ./styles/global.css
[13:31:17.417] Module build failed: Error: Final loader (./node_modules/next/dist/build/webpack/loaders/error-loader.js) didn't return a Buffer or String
[13:31:17.417]     at processResult (/vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:405934)
[13:31:17.417]     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:407465
[13:31:17.418]     at /vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:8727
[13:31:17.418]     at iterateNormalLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5565)
[13:31:17.418]     at iterateNormalLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5650)
[13:31:17.418]     at /vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5879
[13:31:17.418]     at runSyncOrAsync (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:4185)
[13:31:17.418]     at iterateNormalLoaders (/vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5782)
[13:31:17.418]     at /vercel/path0/node_modules/next/dist/compiled/loader-runner/LoaderRunner.js:1:5426
[13:31:17.418]     at /vercel/path0/node_modules/next/dist/compiled/webpack/bundle5.js:28:406955
[13:31:17.418] 
[13:31:17.418] Import trace for requested module:
[13:31:17.418] ./styles/global.css
[13:31:17.418] 
[13:31:17.428] 
[13:31:17.428] > Build failed because of webpack errors
[13:31:17.451] Error: Command "npm run build" exited with 1
[13:31:17.617]

Hey @arwinja!

I see a warning about the Node.js version. Sometimes version incompatibility can cause build errors. What version of Node do you use in your development environment, and what version is selected in Project Settings?