How to debug "Cannot set properties of undefined (setting 'string')"?
Unanswered
American posted this in #help-forum
AmericanOP
Hello!
How can I debug this error?
I only see it in my CI and deployed live. When I build and run locally I don't get the same errors. I build the same docker images when I try to replicate it. Is it possible to get source maps or something?
I do have
How can I debug this error?
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
TypeError: Cannot set properties of undefined (setting 'string')
at Object.extend (/app/apps/nextjs/.next/server/chunks/2988.js:1:43708)
I only see it in my CI and deployed live. When I build and run locally I don't get the same errors. I build the same docker images when I try to replicate it. Is it possible to get source maps or something?
I do have
serverSourceMaps: true,
in my config4 Replies
AmericanOP
bump
AmericanOP
Seems to be a prismjs error?
⨯ TypeError: Cannot set properties of undefined (setting 'string')
at Object.extend (.next/server/chunks/8439.js:1:30036)
at 824264 (.next/server/chunks/8439.js:1:52755)
at t (.next/server/webpack-runtime.js:1:511)
at 924118 (.next/server/chunks/8439.js:1:55711)
at t (.next/server/webpack-runtime.js:1:511)
at 393631 (.next/server/app/(app)/larare/[groupId]/page.js:1:47667)
at t (.next/server/webpack-runtime.js:1:511)
at 660108 (.next/server/app/(app)/larare/[groupId]/page.js:1:83514)
at t (.next/server/webpack-runtime.js:1:511)
at <unknown> (.next/server/chunks/677.js:3:10944) {
digest: '112580986'
}
source-map resolve 8439.js.map 1 30036
Maps to webpack://node_modules/.pnpm/prismjs@1.29.0/node_modules/prismjs/prism.js?d6ca:345:0
lang[key] = redef[key];
AmericanOP
For me, it was related to running lexical in headless