title: next-i18next was unable to find a user config
body: <p>i was trying to add translation to my app, but i'm stuck on this error:</p>
  <pre><code>error - Error: next-i18next was unable to find a user config
      at _callee$ (/media/coyas/47B492C22544E4BA/TERRA_SYSTEM/software_center/iMedia/ZebraGroupe/zebraTravel/zebraTravelWebUI/node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:196:19)
      at tryCatch (/media/coyas/47B492C22544E4BA/TERRA_SYSTEM/software_center/iMedia/ZebraGroupe/zebraTravel/zebraTravelWebUI/node_modules/regenerator-runtime/runtime.js:63:40)
      at Generator.invoke [as _invoke] (/media/coyas/47B492C22544E4BA/TERRA_SYSTEM/software_center/iMedia/ZebraGroupe/zebraTravel/zebraTravelWebUI/node_modules/regenerator-runtime/runtime.js:294:22)
      at Generator.next (/media/coyas/47B492C22544E4BA/TERRA_SYSTEM/software_center/iMedia/ZebraGroupe/zebraTravel/zebraTravelWebUI/node_modules/regenerator-runtime/runtime.js:119:21)
      at asyncGeneratorStep (/media/coyas/47B492C22544E4BA/TERRA_SYSTEM/software_center/iMedia/ZebraGroupe/zebraTravel/zebraTravelWebUI/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (/media/coyas/47B492C22544E4BA/TERRA_SYSTEM/software_center/iMedia/ZebraGroupe/zebraTravel/zebraTravelWebUI/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
      at /media/coyas/47B492C22544E4BA/TERRA_SYSTEM/software_center/iMedia/ZebraGroupe/zebraTravel/zebraTravelWebUI/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
      at new Promise (&lt;anonymous&gt;)
      at /media/coyas/47B492C22544E4BA/TERRA_SYSTEM/software_center/iMedia/ZebraGroupe/zebraTravel/zebraTravelWebUI/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12
      at serverSideTranslations (/media/coyas/47B492C22544E4BA/TERRA_SYSTEM/software_center/iMedia/ZebraGroupe/zebraTravel/zebraTravelWebUI/node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:259:17) {
    page: '/'
  }
  </code></pre>
  <p>and i found no solution yet.</p>
  <p>i18n.config.js</p>
  <pre><code>const path = require(&quot;path&quot;);
  
  module.exports = {
      i18n: {
          locales: [&quot;en&quot;, &quot;fr&quot;, &quot;pt&quot;],
          defaultLocale: &quot;pt&quot;
      }
  };
  
  </code></pre>
  <p>next.config.js</p>
  <pre><code>require(&quot;dotenv&quot;).config();
  const { i18n } = require(&quot;./i18n.config&quot;);
  
  module.exports = {
      env: {
          API_BASE_URL: process.env.API_BASE_URL,
          SiteKey: process.env.SiteKey,
          SecretKey: process.env.SecretKey
      },
      i18n
  };
  
  </code></pre>
  <p>I'm using serverSideTranslations on almost every page except some componentsand pages.[id].</p>
  <p>ex. on index.js</p>
  <pre><code>import { serverSideTranslations } from &quot;next-i18next/serverSideTranslations&quot;;
  import { useTranslation } from &quot;next-i18next&quot;;
  
  const Home = ({ expe }) =&gt; {
      //const islang = i18n.isInitialized;
      const { t } = useTranslation(&quot;common&quot;);
  ...
  ...
  ...
  export const getStaticProps = async ({ locale }) =&gt; {
      //const obj = { namespacesRequired: [&quot;common&quot;, &quot;footer&quot;, &quot;navbar&quot;] };
      const res = await getExperiencias(2); //limite = 2
      const exp = await res.json();
  
      return {
          props: {
              ...(await serverSideTranslations(locale, [
                  &quot;common&quot;,
                  &quot;footer&quot;,
                  &quot;navbar&quot;
              ])),
              expe: exp
          } // will be passed to the page component as props
      };
  };
  
  export default Home;
  </code></pre>
  <p>this is the link to github branch:
  <a href="https://github.com/Coyas/zebraTravelWebUI/tree/develupdate" rel="nofollow noreferrer">https://github.com/Coyas/zebraTravelWebUI/tree/develupdate</a></p>
  <p>link to i18n-next:
  <a href="https://github.com/isaachinman/next-i18next" rel="nofollow noreferrer">https://github.com/isaachinman/next-i18next</a></p>