defineRouting() and createNavigation() type error for nextjs-intl
Answered
White-crowned Sparrow posted this in #help-forum
White-crowned SparrowOP
I keep getting:
on both the
I'm using NextJS 14 and and nextjs-intl 3.24.0
I'm following the directions here: https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing
Are there version compatibility issues here?
TS2554: Expected 0 arguments, but got 1
on both the
defineRouting()
and createNavigation()
line.I'm using NextJS 14 and and nextjs-intl 3.24.0
I'm following the directions here: https://next-intl-docs.vercel.app/docs/getting-started/app-router/with-i18n-routing
import { defineRouting } from "next-intl/routing";
import { createNavigation } from "next-intl/navigation";
export const routing = defineRouting({
// A list of all locales that are supported
locales: ["en", "de"],
// Used when no locale matches
defaultLocale: "en",
});
// Lightweight wrappers around Next.js' navigation APIs
// that will consider the routing configuration
export const { Link, redirect, usePathname, useRouter } =
createNavigation(routing);
Are there version compatibility issues here?
Answered by White-crowned Sparrow
Upgrading to TS 5 fixed the build. Though you still get warnings here in IntelliJ
1 Reply
White-crowned SparrowOP
Upgrading to TS 5 fixed the build. Though you still get warnings here in IntelliJ
Answer