site: Florence Barbell Studio or https://florencebarbellstudio.netlify.app/it
Error is presenting in functions log.
error: Oct 8, 05:05:47 PM: ea7a5574 ERROR TypeError: Cannot read properties of undefined (reading 'tabs')Oct 8, 05:05:47 PM: ea7a5574 ERROR at Q (/var/task/.next/server/app/[locale]/page.js:1:128626) {Oct 8, 05:05:47 PM: ea7a5574 ERROR digest: '204379464'Oct 8, 05:05:47 PM: ea7a5574 ERROR }Oct 8, 05:05:47 PM: ea7a5574 ERROR TypeError: Cannot read properties of undefined (reading 'metaHtml')Oct 8, 05:05:47 PM: ea7a5574 ERROR at Module.I (/var/task/.next/server/chunks/172.js:1:12693)Oct 8, 05:05:47 PM: ea7a5574 ERROR at /var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:227710Oct 8, 05:05:47 PM: ea7a5574 ERROR at /var/task/node_modules/next/dist/server/lib/trace/tracer.js:140:36Oct 8, 05:05:47 PM: ea7a5574 ERROR at NoopContextManager.with (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7062)Oct 8, 05:05:47 PM: ea7a5574 ERROR at ContextAPI.with (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:518)Oct 8, 05:05:47 PM: ea7a5574 ERROR at NoopTracer.startActiveSpan (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18093)Oct 8, 05:05:47 PM: ea7a5574 ERROR at ProxyTracer.startActiveSpan (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18854)Oct 8, 05:05:47 PM: ea7a5574 ERROR at /var/task/node_modules/next/dist/server/lib/trace/tracer.js:122:103Oct 8, 05:05:47 PM: ea7a5574 ERROR at NoopContextManager.with (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7062)Oct 8, 05:05:47 PM: ea7a5574 ERROR at ContextAPI.with (/var/task/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:518) {Oct 8, 05:05:47 PM: ea7a5574 ERROR digest: '4285506614'Oct 8, 05:05:47 PM: ea7a5574 ERROR }
If i browse the website i get no error, in any page. I wait some hours and when i check the logs i found a lot of errors like this one.
Local build is ok, no error in console nor in the server terminal.
The " TypeError: Cannot read properties of undefined (reading ‘tabs’" it makes no sense because it should be occouring in every page access.
Thanks for any help.
i tried to change the imports of json files in the page component:
from
import data from ‘…’
to
const fileHome = await fs.readFile(
process.cwd() + “/…”,
“utf8”
);
but no luck:
Oct 12, 10:16:22 AM: 8f9e62bd ERROR [Error: ENOENT: no such file or directory, open ‘/var/task/public/data/metadata/meta-home.json’] {
errno: -2,
code: ‘ENOENT’,
syscall: ‘open’,
path: ‘/var/task/public/data/metadata/meta-home.json’,
digest: ‘263991367’
}
Ok, thanks to all. I found that the error is in the Locale variable by next-intl. I need to further investigate, but seems that this variable is not always available in all the requests. I think next-intl is not so “robust” as project… the strange is that the error was only in the functions consolle of netlify dash