Hi,
Iām new to Frontity and havenāt been able to get past the Quick Start guide, so Iām hoping the community can help me troubleshoot whatās going on.
In a nut shell, Iām able to create a new Frontity project, but when I go to the āStart Developmentā step and run npx frontity dev
my console shows a ton of warnings and then errors out with the following message:
Error: Invalid hook call. Hooks can only be called inside of the body of a fun
ction component. This could happen for one of the following reasons:
- You might have mismatching versions of React and the renderer (such as Reac
t DOM)- You might be breaking the Rules of Hooks
- You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix
this problem.
at resolveDispatcher (webpack-internal:///./node_modules/react/cjs/react.d
evelopment.js?db76:324:911)
at useRef (webpack-internal:///./node_modules/react/cjs/react.development.
js?db76:327:727)
at eval (webpack-internal:///./node_modules/@frontity/connect/src/connect.
js?f25d:14:70)
at processChild (webpack-internal:///./node_modules/react-dom/cjs/react-do
m-server.node.development.js:397:2319)
at resolve (webpack-internal:///./node_modules/react-dom/cjs/react-dom-ser
ver.node.development.js:396:122)
at ReactDOMServerRenderer.render (webpack-internal:///./node_modules/react
-dom/cjs/react-dom-server.node.development.js:433:1199)
at ReactDOMServerRenderer.read (webpack-internal:///./node_modules/react-d
om/cjs/react-dom-server.node.development.js:433:55)
at renderToString (webpack-internal:///./node_modules/react-dom/cjs/react-
dom-server.node.development.js:470:116)
at eval (webpack-internal:///./node_modules/@frontity/core/src/server/inde
x.tsx:68:243)
at runMicrotasks ()
From there, I visited the FB support page https://fb.me/react-invalid-hook-call
but from what I can see all 3 issues mentioned look okay, so Iām not sure if Iām missing something or whatā¦
Here is the output from npx frontity info:
System:
- OS: Windows 8.1 6.3.9600
- CPU: (4) x64 Intel® Core⢠i5-3337U CPU @ 1.80GHz
- Memory: 1.90 GB / 7.87 GB
Binaries:
- Node: 14.15.0 - C:\Program Files\nodejs\node.EXE
- npm: 6.14.8 - C:\Program Files\nodejs\npm.CMD
Browsers:
- Chrome: Not Found
- Internet Explorer: 11.0.9600.19036
npmPackages:
- @frontity/core: ^1.9.1 => 1.9.1
- @frontity/html2react: ^1.5.0 => 1.5.0
- @frontity/mars-theme: ./packages/mars-theme => 1.4.4
- @frontity/tiny-router: ^1.2.4 => 1.2.4
- @frontity/wp-source: ^1.10.0 => 1.10.0
- frontity: ^1.13.0 => 1.13.0
npmGlobalPackages:
- frontity: Not Found
- npx: Not Found
Where should I poke around or what can I troubleshoot next?