Deploy errors

[23:38:47.188] Running build in Washington, D.C., USA (East) – iad1
[23:38:48.215] Cloning github.com/qMikeehxz/Portfolio (Branch: main, Commit: d896147)
[23:38:48.224] Skipping build cache, deployment was triggered without cache.
[23:38:48.796] Cloning completed: 582.000ms
[23:38:49.221] Running "vercel build"
[23:38:49.596] Vercel CLI 41.2.2
[23:38:50.216] Installing dependencies...
[23:38:59.486] npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
[23:38:59.952] npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
[23:39:01.209] npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
[23:39:01.338] npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
[23:39:01.400] npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
[23:39:01.455] npm warn deprecated @humanwhocodes/config-array@0.11.14: Use @eslint/config-array instead
[23:39:03.616] npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
[23:39:03.636] npm warn deprecated eslint@8.42.0: This version is no longer supported. Please see https://eslint.org/version-support for other options.
[23:39:12.814] 
[23:39:12.815] added 452 packages in 16s
[23:39:12.815] 
[23:39:12.815] 157 packages are looking for funding
[23:39:12.816]   run `npm fund` for details
[23:39:13.022] Detected Next.js version: 14.2.24
[23:39:13.022] Running "npm install && npm run build"
[23:39:14.566] 
[23:39:14.566] up to date, audited 74 packages in 1s
[23:39:14.566] 
[23:39:14.566] 13 packages are looking for funding
[23:39:14.566]   run `npm fund` for details
[23:39:14.566] 
[23:39:14.567] found 0 vulnerabilities
[23:39:14.827] 
[23:39:14.828] > build
[23:39:14.828] > npm install && next build
[23:39:14.828] 
[23:39:15.670] 
[23:39:15.671] up to date, audited 74 packages in 773ms
[23:39:15.671] 
[23:39:15.671] 13 packages are looking for funding
[23:39:15.671]   run `npm fund` for details
[23:39:15.673] 
[23:39:15.673] found 0 vulnerabilities
[23:39:16.243] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[23:39:16.244] This information is used to shape Next.js' roadmap and prioritize features.
[23:39:16.244] 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:
[23:39:16.244] https://nextjs.org/telemetry
[23:39:16.245] 
[23:39:16.301]   ▲ Next.js 14.2.24
[23:39:16.302] 
[23:39:16.367]    Creating an optimized production build ...
[23:39:23.213] Failed to compile.
[23:39:23.213] 
[23:39:23.213] src/app/layout.tsx
[23:39:23.213] An error occurred in `next/font`.
[23:39:23.213] 
[23:39:23.213] Error: Cannot find module 'tailwindcss'
[23:39:23.213] Require stack:
[23:39:23.214] - /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js
[23:39:23.214] - /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/index.js
[23:39:23.214] - /vercel/path0/node_modules/next/dist/build/webpack/config/index.js
[23:39:23.214] - /vercel/path0/node_modules/next/dist/build/webpack-config.js
[23:39:23.214] - /vercel/path0/node_modules/next/dist/build/webpack-build/impl.js
[23:39:23.214] - /vercel/path0/node_modules/next/dist/compiled/jest-worker/processChild.js
[23:39:23.214]     at Function.<anonymous> (node:internal/modules/cjs/loader:1225:15)
[23:39:23.214]     at /vercel/path0/node_modules/next/dist/server/require-hook.js:55:36
[23:39:23.214]     at Function.resolve (node:internal/modules/helpers:146:19)
[23:39:23.214]     at loadPlugin (/vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:49:32)
[23:39:23.214]     at /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:157:56
[23:39:23.214]     at Array.map (<anonymous>)
[23:39:23.214]     at getPostCssPlugins (/vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js:157:47)
[23:39:23.214]     at async /vercel/path0/node_modules/next/dist/build/webpack/config/blocks/css/index.js:124:36
[23:39:23.214]     at async /vercel/path0/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js:86:33
[23:39:23.214]     at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:154:20)
[23:39:23.214] 
[23:39:23.214] ./src/components/Fragments/About/About.tsx
[23:39:23.214] Module not found: Can't resolve '@components/Common/Container/Container'
[23:39:23.214] 
[23:39:23.214] https://nextjs.org/docs/messages/module-not-found
[23:39:23.214] 
[23:39:23.214] Import trace for requested module:
[23:39:23.214] ./src/components/Fragments/Home/Home.tsx
[23:39:23.214] 
[23:39:23.214] ./src/components/Fragments/About/About.tsx
[23:39:23.215] Module not found: Can't resolve '@utils/constants'
[23:39:23.215] 
[23:39:23.215] https://nextjs.org/docs/messages/module-not-found
[23:39:23.215] 
[23:39:23.215] Import trace for requested module:
[23:39:23.215] ./src/components/Fragments/Home/Home.tsx
[23:39:23.215] 
[23:39:23.215] ./src/components/Fragments/Experience/Experience.tsx
[23:39:23.215] Module not found: Can't resolve '@components/Common/Container/Container'
[23:39:23.215] 
[23:39:23.215] https://nextjs.org/docs/messages/module-not-found
[23:39:23.215] 
[23:39:23.215] Import trace for requested module:
[23:39:23.215] ./src/components/Fragments/Home/Home.tsx
[23:39:23.215] 
[23:39:23.215] ./src/components/Fragments/Experience/Experience.tsx
[23:39:23.215] Module not found: Can't resolve '@utils/constants'
[23:39:23.215] 
[23:39:23.215] https://nextjs.org/docs/messages/module-not-found
[23:39:23.215] 
[23:39:23.216] Import trace for requested module:
[23:39:23.216] ./src/components/Fragments/Home/Home.tsx
[23:39:23.216] 
[23:39:23.232] 
[23:39:23.232] > Build failed because of webpack errors
[23:39:23.264] Error: Command "npm install && npm run build" exited with 1
[23:39:24.284] 

The process of build and run in the vscode terminal works perfectly without errors.
I don’t know what happened here but i have tailwind.config and the paths and everything right.


Help please. Where we can connect to the Vercel Staff?

You’re in the right place, @miguelfiveme!

It looks like there are quite a few build errors, but I can’t be sure of why that’s happening without knowing more about your project. Would you be able to share the repo publicly, or maybe a minimal reproducible example if you have one?

If not, it would be helpful to see the package.json dependencies and the file tree. That will give me a better idea of where things are expected to exist and what settings might be contributing to the problem.

1 Like

Yh i can share. Thx. You have discord or github to add there? I have the project on github

This is my package.json by the way.

{
  "name": "robiot",
  "private": true,
  "scripts": {
    "dev": "next dev --turbo",
    "build": "npm install && next build",
    "start": "next start",
    "static": "next build && next export",
    "lint": "next lint"
  },
  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.7.2",
    "@fortawesome/free-solid-svg-icons": "^6.7.2",
    "@fortawesome/react-fontawesome": "^0.2.2",
    "@tanstack/react-query": "^5.8.4",
    "classnames": "^2.3.2",
    "framer-motion": "^7.5.3",
    "next": "^14.0.2",
    "next-seo": "^5.5.0",
    "nprogress": "^0.2.0",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-icons": "^4.12.0",
    "seedrandom": "^3.0.5",
    "sharp": "^0.33.5",
    "styled-components": "^6.1.15"
  },
  "devDependencies": {
    "@next/eslint-plugin-next": "^14.0.2",
    "@types/node": "16.11.11",
    "@types/nprogress": "^0.2.0",
    "@types/react": "18.0.19",
    "@types/styled-components": "^5.1.34",
    "@types/vivus": "^0.4.7",
    "@typescript-eslint/eslint-plugin": "^5.62.0",
    "@typescript-eslint/parser": "^5.36.2",
    "autoprefixer": "^10.4.13",
    "eslint-plugin-robiot": "^1.0.1",
    "eslint-plugin-unused-imports": "^2.0.0",
    "postcss": "^8.4.20",
    "tailwindcss": "^3.2.4",
    "typescript": "^4.5.5"
  }
}

Thanks for sharing the package.json. I have one more idea to try before you share any of your code.

What are the framework settings for the project? Sometimes overriding commands can result in errors. If you have any overrides set, then one easy test is to just toggle off any overrides. What happens if you try to deploy using the default Next.js framework preset?

I’m amyegan on GitHub if you still need someone to take a closer look at the code after trying that

1 Like

I’m not sure if the framework settings are this:


Hmm, before this I had errors with the pnpm. It had something to do with a frozen-lockfile pnpm error. I ended up removing everything regarding pnpm and I think it’s only working with npm by default.
Now I don’t know why this is happening if I can perfectly get it running locally

I already gave you access to the repository
https://github.com/qMikeehxz/Portfolio

If you could help I would be very grateful :slight_smile:

Thanks for sharing the repo. There were a couple of build settings that I had to change to get it working. Basically, anywhere you have npm install && next build should be changed to simply next build. There’s a separate install step that handles package installation prior to the build step.

What I changed:

  • Remove "buildCommand": "npm install && npm run build" from vercel.json
  • Change build script in package.json to just next build
  • Go to Settings from the Vercel project dashboard, open the Build and Deployment tab, make sure Next.js is selected as the Framework Preset and turn off any command overrides

Hope that helps!

1 Like

Thx Amy <3! A virtual hug from me just because I can’t give it to you in person

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.