Next.js Discord

Discord Forum

issue deploying to vercel

Answered
Giant panda posted this in #help-forum
Open in Discord
Avatar
Giant pandaOP
hi guys,

when i build locally everything is fine, when i deploy to vercel, i get the following error
Image
Answered by linesofcode
Check the casing of the file names
View full answer

40 Replies

Avatar
Risky
do you have a tsconfig file, and if so can you post it here
Avatar
Giant pandaOP
just the @ sign
{
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "plugins": [
      {
        "name": "next"
      }
    ],
    "paths": {
      "@/*": ["./*"]
    }
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
  "exclude": ["node_modules"]
}
Avatar
Risky
uhh so it is there... have you customized the build script somehow?
Avatar
Giant pandaOP
{
  "name": "nextjs",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint",
    "format": "prettier --write \"./{components,data,interfaces,lib,models,pages,public,styles,types,validations}/**/*.{ts,tsx,js,json,html,css}\"",
    "postbuild": "next-sitemap"
  },
  "dependencies": {
    "alymkarimg-react-search-box": "^3.9.0",
    "formidable": "^3.5.1",
    "moment": "^2.29.4",
    "mongoose": "^6.8.0",
    "next": "latest",
    "next-sitemap": "^3.1.32",
    "prettier": "^2.8.0",
    "react": "^18",
    "react-data-table-component": "^7.5.4",
    "react-datepicker": "^4.19.0",
    "react-dom": "^18",
    "react-range-slider-input": "^3.0.7",
    "react-select": "5",
    "react-toastify": "^9.1.3",
    "zod": "^3.22.4"
  },
  "devDependencies": {
    "@types/formidable": "^3.4.3",
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-datepicker": "^4.15.1",
    "@types/react-dom": "^18",
    "@typescript-eslint/eslint-plugin": "5.62.0",
    "@typescript-eslint/parser": "^5.62.0",
    "autoprefixer": "^10",
    "eslint": "^8.7.0",
    "eslint-config-next": "13.5.4",
    "postcss": "^8",
    "typescript": "^5"
  }
}
i changed prettier abit
Avatar
Risky
and you have:
/pages
/components
  /forms
    /JobUploadForm.tsx
/package.json
Avatar
Giant pandaOP
Image
Avatar
Risky
and inside your components folder
and whats your code for said file (like are you default export)
Avatar
Giant pandaOP
Image
yeah, i tried standard exports too
both resulted in the same error
Avatar
Risky
so something like export default function JobUploadForm() right
Avatar
Giant pandaOP
Image
Avatar
Risky
i meant in the component file, how does that look
Avatar
Giant pandaOP
export default JobUploadForm;
at present
Avatar
Risky
uhhhh this looks very normal
Avatar
Giant pandaOP
yeah
Avatar
Risky
and npm run build && npm run start on local device works?
vercel must be having issues 😭
Avatar
Giant pandaOP
Image
ah damn
im off for lunch then
Avatar
Risky
enjoy (sorry that i couldn't be of any assistance)
Avatar
Giant pandaOP
No worries, I’m pretty much out of them too
Thanks for your time!
Avatar
linesofcode
Hey
Avatar
linesofcode
Check the casing of the file names
Answer
Avatar
linesofcode
Between your file system
And what’s in GitHub
Avatar
Risky
ohh that is smart, windows can sometimes be nicer than linux
Avatar
linesofcode
Git can be case sensitive or case insensitive
Depending on the os and your config
Avatar
Giant pandaOP
Sure! Thanks, will do, I’ll brb
Avatar
Giant pandaOP
Nice, that was it, i changed Forms => forms
Avatar
Risky
lol one more thing added to my list of weirdness to check 🙂
Avatar
linesofcode
Nice!