Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(): use getStaticProps instead of getServerSideProps in hosted pages link page #85

Merged
merged 3 commits into from
Mar 2, 2023

Conversation

mohsinht
Copy link
Contributor

@mohsinht mohsinht commented Mar 2, 2023

i18next/next-i18next#1552

This getServerSideProps is not working as expected.

See these errors in Vercel logs:

Error: ENOENT: no such file or directory, scandir '/var/task/public/locales/en'
    at Object.readdirSync (node:fs:1438:3)
    at getLocaleNamespaces (/var/task/node_modules/next-i18next/dist/commonjs/config/createConfig.js:214:16)
    at /var/task/node_modules/next-i18next/dist/commonjs/config/createConfig.js:231:20
    at Array.map (<anonymous>)
    at getNamespaces (/var/task/node_modules/next-i18next/dist/commonjs/config/createConfig.js:230:44)
    at createConfig (/var/task/node_modules/next-i18next/dist/commonjs/config/createConfig.js:271:29)
    at _callee$ (/var/task/node_modules/next-i18next/dist/commonjs/serverSideTranslations.js:201:53)
    at tryCatch (/var/task/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:86:17)
    at Generator._invoke (/var/task/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:66:24)
    at Generator.next (/var/task/node_modules/@babel/runtime/helpers/regeneratorRuntime.js:117:21) {
  errno: -2,
  syscall: 'scandir',
  path: '/var/task/public/locales/en',
  page: '/l/[hostedPagesLinkId]'
}

@vercel
Copy link

vercel bot commented Mar 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
hosted-pages ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 2, 2023 at 7:00PM (UTC)

@mohsinht mohsinht merged commit 2553e88 into main Mar 2, 2023
@mohsinht mohsinht deleted the fix/use-getStaticProps-instead-of-getServerSideProps branch March 2, 2023 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant