I have seen several people complain about this contact form 7 error, but no one seems to give a solution.
TypeError: Cannot assign to read only property 'name' of function 'props=>{// Dummy setState to update the component.
const[,setState]=Object(react__WEBPACK_IMPORTED_MODULE_1__["...<omitted>...}}'
at eval (webpack-internal:///./node_modules/@frontity/connect/src/connect.js:91:71)
at Array.forEach (<anonymous>)
at connect (webpack-internal:///./node_modules/@frontity/connect/src/connect.js:91:40)
at eval (webpack-internal:///./node_modules/frontity-contact-form-7/src/processors/cf7HiddenInputs.js:5:568)
at Module../node_modules/frontity-contact-form-7/src/processors/cf7HiddenInputs.js (C:\Users\Mannu\OneDrive\Escritorio\Programación\manuwweb\build\server.js:2874:1)
at __webpack_require__ (C:\Users\Mannu\OneDrive\Escritorio\Programación\manuwweb\build\server.js:27:30)
at eval (webpack-internal:///./node_modules/frontity-contact-form-7/src/index.js:9:85)
at Module../node_modules/frontity-contact-form-7/src/index.js (C:\Users\Mannu\OneDrive\Escritorio\Programación\manuwweb\build\server.js:2850:1)
at __webpack_require__ (C:\Users\Mannu\OneDrive\Escritorio\Programación\manuwweb\build\server.js:27:30)
at eval (webpack-internal:///./build/bundling/entry-points/server.ts:7:91)
It seems that this package does not give an error, but now I have another problem and it is that I cannot fill in the fields of the form.
You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.
Hey @kasper! Been trying to figure solve issues with frontity’s cf7 for over a week now. Tried using your plugin and now instead of the TypeError seen above I’m getting this one.
TypeError: Cannot assign to read only property 'name' of function 'props=>{// Dummy setState to update the component.
const[,setState]=Object(react__WEBPACK_IMPORTED_MODULE_1__["...<omitted>...}}'
at eval (webpack-internal:///./node_modules/@frontity/connect/src/connect.js:91:71)
at Array.forEach (<anonymous>)
at connect (webpack-internal:///./node_modules/@frontity/connect/src/connect.js:91:40)
at eval (webpack-internal:///./packages/hcbf-frontity-theme/src/processors/contactForm.tsx:4:5406)
at Module../packages/hcbf-frontity-theme/src/processors/contactForm.tsx (/Users/kcristin/Local Sites/HCBF/hcbf-frontity/build/server.js:38108:1)
at __webpack_require__ (/Users/kcristin/Local Sites/HCBF/hcbf-frontity/build/server.js:27:30)
at eval (webpack-internal:///./packages/hcbf-frontity-theme/src/index.js:14:81)
at Module../packages/hcbf-frontity-theme/src/index.js (/Users/kcristin/Local Sites/HCBF/hcbf-frontity/build/server.js:38072:1)
at __webpack_require__ (/Users/kcristin/Local Sites/HCBF/hcbf-frontity/build/server.js:27:30)
at eval (webpack-internal:///./build/bundling/entry-points/server.ts:3:87)
Hmm strange that processor is really only there to add styling to the form. Removing it seems to leave me with this error:
TypeError: Cannot assign to read only property 'name' of function 'props=>{// Dummy setState to update the component.
const[,setState]=Object(react__WEBPACK_IMPORTED_MODULE_1__["...<omitted>...}}'
at eval (webpack-internal:///./node_modules/@frontity/connect/src/connect.js:91:71)
at Array.forEach (<anonymous>)
at connect (webpack-internal:///./node_modules/@frontity/connect/src/connect.js:91:40)
at eval (webpack-internal:///./packages/hcbf-frontity-theme/src/index.js:39:1713)
at Module../packages/hcbf-frontity-theme/src/index.js (/Users/kcristin/Local Sites/HCBF/hcbf-frontity/build/server.js:38072:1)
at __webpack_require__ (/Users/kcristin/Local Sites/HCBF/hcbf-frontity/build/server.js:27:30)
at eval (webpack-internal:///./build/bundling/entry-points/server.ts:3:87)
at Module../build/bundling/entry-points/server.ts (/Users/kcristin/Local Sites/HCBF/hcbf-frontity/build/server.js:139:1)
at __webpack_require__ (/Users/kcristin/Local Sites/HCBF/hcbf-frontity/build/server.js:27:30)
at /Users/kcristin/Local Sites/HCBF/hcbf-frontity/build/server.js:104:18
It’s the same but without the contactForm portion. Could it be an error with build/server.js?
Hey @kasper! I apologize I didn’t get back to you sooner, didn’t get around to working on this project yesterday. I’m super happy to say that removing connect from index.js worked! You’re such a life saver thank you !
I used your tutorial for deploying a Frontity site to Vercel through Github and had run into that pesky 500 error. Decided to double back and try seeing if my site still worked locally which (to my dismay it did not) and lead me to this. I’m happy to say that removing connect from index also removed that 500 error from my Vercel deployment. Strange, because I swear I followed Frontity’s tutorial to the tee, but maybe I just added it in as default by mistake. I really can’t thank you enough man! This Vercel issue has been with me for quite some time and I’m relieved that it’s been solved.
Sorry, hadn’t realized you’d replied! Yes, the tutorial was great! Yours seemed to be the only one out there with that followed that flow frontity > github > vercel. And it was very informative! Keep up the great work