Next.js Discord

Discord Forum

How build & deploy TS project with TS Path Aliases

Unanswered
Leafcutting bee posted this in #help-forum
Open in Discord
Leafcutting beeOP
Hi I'm currently having issues with deploying a preview of my application as there is an error with read the file: Module not found: Can't resolve '~/components/NavBar'

My TS config looks like this

/* Path Aliases */
    "baseUrl": ".",
    "paths": {
      "~/*": ["./src/*"]
    }


when I run next build locally it works but when I run next build on vercel it doesn't. Does anyone know to resolves this

0 Replies