amannn / next-intl

🌐 Internationalization (i18n) for Next.js
https://next-intl-docs.vercel.app
MIT License
2.3k stars 210 forks source link

Build Error from the main core file. #1212

Closed SayeedMahdi closed 1 month ago

SayeedMahdi commented 1 month ago

Description

when I run build command for this error comes. I have searched but nothing found to solve. $ pnpm run build

microcis@0.1.0 build F:\working project\target-line next build

▲ Next.js 14.2.5

./node_modules/.pnpm/next-intl@3.17.2next@14.2.5@babel+core@7.24.9_react-dom@18.3.1_react@18.3.1react@18.3.1react@18.3.1/node_modules/next-intl/dist/types/src/navigation/react-client/createSharedPathnamesNavigation.d.ts:4:57 Type error: Type parameter declaration expected.

2 | import { Locales } from '../../routing/types'; 3 | import { SharedNavigationRoutingConfigInput } from '../shared/config';

4 | export default function createSharedPathnamesNavigation(input?: SharedNavigationRoutingConfigInput): { | ^ 5 | Link: (props: Omit<Omit<Omit<Omit<Omit<React.AnchorHTMLAttributes, keyof { 6 | href: string | import("url").UrlObject; 7 | as?: string | import("url").UrlObject;  ELIFECYCLE  Command failed with exit code 1.

Verifications

Mandatory reproduction URL

App Router

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Click on …
  3. See error: …

Expected behaviour

I have checked all the ts ignores file and eslint but non of them worked for me.

github-actions[bot] commented 1 month ago

Thank you for your report!

Unfortunately, the reproduction is missing or incomplete, and as such we cannot investigate this issue. Please add a reproduction to the issue, otherwise it will be closed automatically.

Templates:

Creating a good bug report takes time.

To help us resolve the issue quickly, please simplify the reproduction as much as possible by removing any unnecessary code, files, and dependencies that are not directly related to the problem. The easier it is for us to see the issue, the faster we can help you.

Apart from the reproduction, make sure to include the precise steps on how to reproduce the issue, e.g.:

  1. Open reproduction
  2. Click on …
  3. See error: …

Thank you for your understanding!

FAQ **"I've included a reproduction, what is missing?"** This comment might have been added because your reproduction doesn't point to a destination where the issue can be reproduced. Please make sure that the latest changes were saved in the reproduction and that the link is correct.
SayeedMahdi commented 1 month ago

This error is because of Ts version if you want to use next-intl with next 14 or higher your ts should be higher than 5, it will fix that.

github-actions[bot] commented 1 month ago

This issue has been automatically closed because it is currently not actionable and has become stale. If the problem persists, please create a new issue.