Getting a bunch of type errors upon running yarn next build, for example:
Type error: Property 'href' does not exist on type '{ name: string; }'.
Which causes my build to fail. Is there a command i can put in my tsconfig to prevent this from happening?
From NextJS docs: https://nextjs.org/docs/api-reference/next.config.js/ignoring-typescript-errors
Just put this lines in next.config.js under the typescript section:
module.exports = {
typescript: {
// !! WARN !!
// Dangerously allow production builds to successfully complete even if
// your project has type errors.
// !! WARN !!
ignoreBuildErrors: true,
},
}
just put
// @ts-ignore
in the line you want to disable type checking