"TypeError: Cannot assign to read only property 'name' of function" in cf7

Hi,

After the latest Frontity release, I get this error when I try to run in localhost:

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/@aamodtgroup/frontity-contact-form-7/src/processors/cf7HiddenInputs.js:5:568)
    at Module../node_modules/@aamodtgroup/frontity-contact-form-7/src/processors/cf7HiddenInputs.js (/Users/kasperaamodt/GitHub/aamodtgroup/build/server.js:283:1)
    at __webpack_require__ (/Users/kasperaamodt/GitHub/aamodtgroup/build/server.js:27:30)
    at eval (webpack-internal:///./node_modules/@aamodtgroup/frontity-contact-form-7/src/index.js:9:85)
    at Module../node_modules/@aamodtgroup/frontity-contact-form-7/src/index.js (/Users/kasperaamodt/GitHub/aamodtgroup/build/server.js:259:1)
    at __webpack_require__ (/Users/kasperaamodt/GitHub/aamodtgroup/build/server.js:27:30)
    at eval (webpack-internal:///./build/bundling/entry-points/server.ts:9:104)

This is from the processors to the cf7 package, and I have no idea how to fix it.
Does anyone here know what the error could be? The error stems from the processors of HiddenInput.js and Span.js

If anyone have a solution, you can submit a PR here:

https://github.com/aamodtgroup/frontity-contact-form-7/pulls

Hello Kasper,

I’ve had a similar issue with my packages.

Try updating the version of frontity in this file: frontity-contact-form-7/package.json at main · aamodtgroup/frontity-contact-form-7 · GitHub

Hi @maurice.tadros

I just tried it, but unfortunately I still get the same error message. Thanks for the suggestion!

I noticed that the Span and HiddenInput processors used export default connect(), while the other processors only used export default. So I removed the connect, and it started to work again.

Hi again.

It fixed the TypeError, but now the input fields do not work…

https://aamodtgroup.com/kontakt-oss/

Hi! I seem to have the exact same issue, wondering if you’ve found a solution to the issue yet?

Hi @matilda!

Have you updated the package and frontity? And what cf7 package are you using?

Hi @kasper :wave: Yeah, I installed the contact form 7 plugin in wp but the input fields didn’t work. Found this and installed frontity-contact-form-7, ^0.1.7. Then found your question here and updated frontity to ^1.16.0, but still the same error as you have posted here.

EDIT: Just found your package, and the error seem to be gone and the inputs are typable :star:

Hi @matilda!

Great to hear, lmk if you have any other issues with the package. :smiley: