Error while running 'next start' with next-translate configuration
See original GitHub issueHi,
I am using next-translate in my app followed the readme given here next-translate.
It runs without issues when i do ‘yarn dev’. However it fails when i do “next build && next start” with below given error. This is noticed only with next-translate configuration. if i remove next-translate configuration from next.config.js it works perfectly fine. Can any one please help what is wrong here.
TypeError: argument entity must be string, Buffer, or fs.Stats
at etag (C:\~\~`\AppData\Roaming\npm\node_modules\next\dist\compiled\etag\index.js:1:944)
// next.confg.ts
module.exports = withPlugins([nextTranslate], nextConfig);
// i18n.js
module.exports = {
locales: ['en'],
defaultLocale: 'en',
pages: {
'*': ['common'],
'/': ['home'],
},
loadLocaleFrom: (lang, ns) =>
// You can use a dynamic import, fetch, whatever. You should
// return a Promise with the JSON file.
import(`./public/locales/${lang}/${ns}.json`).then((m) => m.default),
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Error while running 'next start' with next-translate configuration
Hi, I am using next-translate in my app followed the readme given here next-translate. It runs without issues when i do 'yarn dev'....
Read more >next.js - How to add next-translate to next.config - Stack Overflow
You have to add your custom nextConfig as a parameter to nextTranslate() . Use this code: const nextTranslate = require('next-translate') ...
Read more >next-config-error - Next.js
When attempting to load your next.config.js or next.config.mjs file, an error occurred. This could be due to a syntax error or attempting to...
Read more >@autushka/next-translate - npm package | Snyk
Learn more about @autushka/next-translate: package health score, ... Get started free ... Add a configuration file i18n.json in the root of the project....
Read more >Next-translate NPM - npm.io
An array with all the routes to ignore in the middleware. This config property only effect using a custom server with the i18nMiddleware...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@pramod-bhandarkar if you replace
to
still not working?
No idea. I tried and it works well. I can’t reproduce your issue. If you can share your project or an example repo with the error it would be great to see what it is. Thanks!