I'im trying to implement next-i18next in my project. No fancy config right now, it's basically taking the simple sample and putting it my project at the moment. Everything seems to be fine according to the sample. But when I run npm run dev, I have this error
> npm run dev
> [email protected] dev /mnt/e/Projects/next-i18n
> node server.js
/mnt/e/Projects/next-i18n/i18n.js:2
const { localeSubpaths } = require('next/config').default().publicRuntimeConfig;
^
TypeError: Cannot read property 'publicRuntimeConfig' of undefined
at Object.<anonymous> (/mnt/e/Projects/next-i18n/i18n.js:2:60)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
at Module.load (internal/modules/cjs/loader.js:1040:32)
at Function.Module._load (internal/modules/cjs/loader.js:929:14)
at Module.require (internal/modules/cjs/loader.js:1080:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/mnt/e/Projects/next-i18n/server.js:5:21)
at Module._compile (internal/modules/cjs/loader.js:1176:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1196:10)
Module version is 4.4.2
i18n)npm installnpm run devThe dev server should launch and translations should work
/
/
Please post on StackOverflow. Good luck!