next.config.js module export error
See original GitHub issueI have the following code in my next.config.js and it currently works
const nextTranslate = require("next-translate")
module.exports = nextTranslate
When i try to change module.exports = nextTranslate to module.exports = nextTranslate(), I get the following typescript error:
This expression is not callable. Type ‘typeof import(“D:/test/node_modules/next-translate/index”)’ has no call signatures.ts(2349)
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
next.config.js module export error · Issue #780 - GitHub
I have the following code in my next.config.js and it currently works const nextTranslate = require("next-translate") module.exports ...
Read more >next.config.js: Introduction
next.config.js is a regular Node.js module, not a JSON file. ... NextConfig} */ const nextConfig = { /* config options here */ }...
Read more >I have an error while customizing my default next config js file ...
Two things. The first export ist correct, you just have a typo. But you are defining the export again. You can just have...
Read more >Error: Failed to load next.config.js - Square Developer
I'm getting a config error when running npm run dev coming from next.config.js and can't figure out what's causing it.…
Read more >Next.js + Webpack - Fix for ModuleNotFoundError: Module not ...
To fix the error with Webpack 5, update your Next.js config file ( /next.config.js ) with the following, it tells webpack not to...
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

Thank you for the reproduction repository! If you read the Error message after
yarn dev, is saying that you miss thei18nfile.In reality you miss 2 things:
i18n.jsonfilelocalesfolder with your translationsi18n.jsonfile:locales:More details in the documentation.
I have the same issue. Just wanted to set things up.
I did the following steps:
Translations work but the error is present. Reseting VScode settings doesn’t help