1

I am running Sitecore 10 locally with Next.js The site works fine in Experience Editor but in normal mode i.e. http://localhost:3000/ I started getting this error below. Tried everything but in vain, there is no clue on the console either. Would appreciate quick help

Server Error
TypeError: Cannot read properties of null (reading 'key')

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
<unknown>
file:///C:/sitecore/src/rendering/node_modules/@sitecore-jss/sitecore-jss/dist/cjs/i18n/graphql-dictionary-service.js (106:57)
Array.forEach
<anonymous>
<unknown>
file:///C:/sitecore/src/rendering/node_modules/@sitecore-jss/sitecore-jss/dist/cjs/i18n/graphql-dictionary-service.js (106:25)
runMicrotasks
<anonymous>
processTicksAndRejections
node:internal/process/task_queues (96:5)
2
  • Are you seeing this on every page? Or just for a specific dictionary entry ? You can try republishing and restarting your rendering host to avoid probability of cache causing this issue. Commented Jul 20, 2023 at 12:48
  • @Zaheer Tariq This looks like a graphql error on next.js side. Did you run npm run graphql:update in your next.js application? Also, execute npm run build after that so you have the build utilizing the latest graphql changes. Commented Jul 20, 2023 at 13:36

1 Answer 1

0

I had this issue today; the fix was just rebuilding the index.

More details: The GraphQl search query for Dictionary was returning some null results because the index is not up to date, and it seems that the dictionary service was erroring out on these null results

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.