issue deploying to vercel
Answered
Giant panda posted this in #help-forum
Giant pandaOP
hi guys,
when i build locally everything is fine, when i deploy to vercel, i get the following error
when i build locally everything is fine, when i deploy to vercel, i get the following error
40 Replies
risky
do you have a tsconfig file, and if so can you post it here
/ do you have any paths set: https://www.typescriptlang.org/tsconfig#paths
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"]
}
risky
uhh so it is there... have you customized the build script somehow?
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
risky
and you have:
/pages
/components
/forms
/JobUploadForm.tsx
/package.json
Giant pandaOP
risky
and inside your components folder
and whats your code for said file (like are you default export)
Giant pandaOP
yeah, i tried standard exports too
both resulted in the same error
risky
so something like
export default function JobUploadForm()
rightGiant pandaOP
risky
i meant in the component file, how does that look
Giant pandaOP
export default JobUploadForm;
at present
risky
uhhhh this looks very normal
Giant pandaOP
yeah
risky
and
npm run build && npm run start
on local device works?vercel must be having issues ðŸ˜
Giant pandaOP
ah damn
im off for lunch then
risky
enjoy (sorry that i couldn't be of any assistance)
Giant pandaOP
No worries, I’m pretty much out of them too
Thanks for your time!
linesofcode
Hey
linesofcode
Check the casing of the file names
Answer
linesofcode
Between your file system
And what’s in GitHub
risky
ohh that is smart, windows can sometimes be nicer than linux
linesofcode
Git can be case sensitive or case insensitive
Depending on the os and your config
Giant pandaOP
Sure! Thanks, will do, I’ll brb
Giant pandaOP
Nice, that was it, i changed Forms => forms
risky
lol one more thing added to my list of weirdness to check 🙂
linesofcode
Nice!