The team is now working on the WordPress Interactivity API. This unblocks the same UX Frontity framework enabled but directly in WordPress Core, fully compatible with the new Site Editor.
I worked, I didn’t want to wait for tomorrow.
But I needed to create a new Frontity project, because I got some weird error with the old installation after updating it with npm install. I guess I have messed something while trying to get image imported during weekend.
In case you @luisherranz are interested that error, it’s there below. But like I said, I may caused that by messing with webpack, before you provided the update.
TypeError: Cannot read property 'frontity' of undefined
at Theme (webpack-internal:///./packages/mars-theme/src/html/components/theme.js:23:329)
at ReactiveClassComp.render (webpack-internal:///./node_modules/@frontity/connect/src/connect.js:13:170)
at runAsReaction (webpack-internal:///./node_modules/@frontity/connect/src/reactionRunner.js:16:45)
at ReactiveClassComp.reaction [as render] (webpack-internal:///./node_modules/@frontity/connect/src/observer.js:7:131)
at processChild (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:456:631)
at resolve (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:451:122)
at ReactDOMServerRenderer.render (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:487:855)
at ReactDOMServerRenderer.read (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:487:55)
at renderToString (webpack-internal:///./node_modules/react-dom/cjs/react-dom-server.node.development.js:520:116)
at app.use (webpack-internal:///./node_modules/@frontity/core/src/server/index.tsx:47:243)
frontity.state
VM989:1 Uncaught ReferenceError: frontity is not defined
at :1:1
luisherranz4
Do you have a repo we can take a look at?
marika.kononen5
I pushed the broken code here:
But like I said, I tried many different things before Frontity update and maybe I messed something.
smit.soni226
Hi @marika.kononen!
I faced the same error. But it was fixed by just replacing Your-Project/node_modules/@ frontity folder with the same folder from latest frontity project (npx frontity create my-app).
Just an additional note: instead of copying and pasting the node_modules folder you can run npm update to update all your packages.
During the beta version we probably want to also run npm outdated:
And update manually any package that appears there with:
npm install @frontity/core@latest
Please note that during the beta using npm install ...@latest can include breaking changes and broke your code if it’s not properly updated. That won’t happen once we release the 1.0.0 version.
If you guys want to learn more about semantic versioning you can take a look at https://semver.org/