TypeScript Error: defineRouting expects 0 arguments but got 1 during npm run build #1436
-
DescriptionI'm encountering a TypeScript error when running npm run build in my Next.js project that uses next-intl. Interestingly, the error does not occur when I run npm run dev; everything works as expected in the development environment. Error Message:
Verifications
Mandatory reproduction URLhttps://github.com/amannn/next-intl-bug-repro-app-router Reproduction descriptionSteps to reproduce:
Expected behaviourThe project should build successfully without any TypeScript errors, just as it does during development with npm run dev. Actual Behavior: The build process fails with the TypeScript error mentioned above, indicating that defineRouting expects 0 arguments but received 1. Additional Information: tsconfig.json:
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
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.:
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. |
Beta Was this translation helpful? Give feedback.
-
Hello, I can't include more about reproduction because it is very simple and it is al explained in the 1st post. All that I can do is to share my project and you can try it yourself @amannn https://github.com/NachoTamayo/VTTS/ Regards |
Beta Was this translation helpful? Give feedback.
-
If you can provide a minimal reproduction based on the provided template then I'm happy to have a look, but bug reports are not meant for general support requests—sorry. I'll move this to a discussion. |
Beta Was this translation helpful? Give feedback.
-
Incase anyone stumbles on this - it's likely that the typescript version being used to build is outdated. Try updating your typescript dependency and see if this error disappears. |
Beta Was this translation helpful? Give feedback.
-
I have encountered the same issue and upgrading to the latest TypeScript version fixed the issue for me 👍 |
Beta Was this translation helpful? Give feedback.
Incase anyone stumbles on this - it's likely that the typescript version being used to build is outdated. Try updating your typescript dependency and see if this error disappears.