Module not found error on Vercel Deployment with TsConfig Paths
Unanswered
Greater White-fronted Goose posted this in #help-forum
Greater White-fronted GooseOP
./src/app/page.tsx
Module not found: Can't resolve '@/hooks/useLoading'
https://nextjs.org/docs/messages/module-not-found
./src/app/page.tsx
Module not found: Can't resolve '@/components/cards/tab-component'
https://nextjs.org/docs/messages/module-not-found
> Build failed because of webpack errors
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command "yarn run build" exited with 1I get this error on vercel
My ts config
{
"compilerOptions": {
"target": "es5",
"downlevelIteration": true,
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}And no it's no a case senstive issue. What is this vercel bug?
3 Replies
Greater White-fronted GooseOP
Can't even use paths with vercel what a joke
@Greater White-fronted Goose Can't even use paths with vercel what a joke
have you tried
npm run build locally before trying to blame vercel?