Build issue
MartinN3 opened this issue · 3 comments
next-strict-csp/dist/cjs/index.js
Line 58 in 97f3b46
Hello this line with coalescent operator might prevent building project, could we make it more backward compatible by removing it?
Hi @MartinN3,
thanks for your feedback.
Could you give me more details about BACKWARD COMPATIBLE please? Do you mean about ES backward compatibility? If so, can you give a concrete example that prevent building project.
Thanks!
I had probably meant optional chaining.
What i meant to articulate, when i posted issue (it's long time ago) - My nextjs project wouln´t build, i think problem could had been, that optional chaining was introduced in Node v14.
I am seeing same issue, followed your blog exactly, step by step, and got this build error on yarn dev.
TypeError: Cannot add property content, object is not extensible
at[redacted]/node_modules/next-strict-csp/dist/cjs/index.js:60:45
at [redacted]/node_modules/react/cjs/react.development.js:1104:17
at [redacted]/node_modules/react/cjs/react.development.js:1067:17
at mapIntoArray ([redacted]/node_modules/react/cjs/react.development.js:964:23)
at mapIntoArray ([redacted]/node_modules/react/cjs/react.development.js:1004:23)
at mapChildren ([redacted]/node_modules/react/cjs/react.development.js:1066:3)
at Object.forEachChildren [as forEach] ([redacted]/node_modules/react/cjs/react.development.js:1103:
... and so on...
@guydumais could you try a recent fresh build with fresh install of next.js and libraries and see if you get different?