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 have followed the instructions to create my first theme and everything was just fine up until the “Displaying Posts” chapter. Afterwards, for some reason, the site will not load after clicking the http://localhost:3000.
I have checked but cannot find where the mistake may be. When I made a repository with the project in GitHub, I was not able to get the whole project to appear. The “my-first-theme” folder does not show up in the “packages” folder which probably points to the error, but which I unfortunately, cannot find for being a newbie.
Again, I am completely new to this, including gits and GitHub. I would appreciate your patience and assistance. Thank you in advance!
mburridge2
Hi @yannisvmx
I notice that you don’t have a root level package.json in your repo. Did you fail to include it in your commit, or is it missing in your local project?
What happens when you run npx frontity dev?
The error message in the browser seems to suggest that the web server is not running, or not running on port 3000.
yannisvmx3
Thank you for your reply. This is how the structure is locally:
I had issues when trying to place the repo on GitHub and finally decided to just upload the package folder through the visual UI (drag and drop files), which has limitations. This is the repo I managed to commit through the CLI: https://github.com/griego62/hello-frontity.
I am not very CLI savvy, so I thought I may be doing something wrong and could not get the whole content of the package folder on GitHub.
When I ran npx frontity dev, localhost:3000 managed to load. This is what CLI returned:
SERVER STARTED -- Listening @ http://localhost:3000
- mode: development
- target: module
- public-path: /static/
(node:10580) Warning: Closing file descriptor 3 on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10580) [DEP0137] DeprecationWarning: Closing a FileHandle object on garbage collection is deprecated. Please close FileHandle objects explicitly using FileHandle.prototype.close(). In the future, an error will be thrown if a file descriptor is closed during garbage collection.
webpack built client 07515e04268947e22c01 in 3120ms
i 「wdm」: Hash: 07515e04268947e22c0142732581c5e5f338631a
Version: webpack 4.46.0
Child client:
Hash: 07515e04268947e22c01
Time: 3120ms
Built at: 18/06/2021 19:30:02
Asset Size Chunks Chunk Names
../bundling/chunks.module.json 669 bytes [emitted]
hello-frontity.module.js 5.48 MiB hello-frontity [emitted] [big] hello-frontity
Entrypoint hello-frontity [big] = hello-frontity.module.js
[0] multi webpack-hot-middleware/client ./build/bundling/entry-points/hello-frontity/client.ts 40 bytes {hello-frontity} [built]
[./build/bundling/entry-points/hello-frontity/client.ts] 992 bytes {hello-frontity} [built]
[./node_modules/@emotion/react/jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js] 926 bytes {hello-frontity} [built]
[./node_modules/@frontity/connect/src/index.js] 243 bytes {hello-frontity} [built]
[./node_modules/@frontity/core/src/app/index.tsx] 713 bytes {hello-frontity} [built]
[./node_modules/@frontity/core/src/client/index.tsx] 2.2 KiB {hello-frontity} [built]
[./node_modules/@frontity/html2react/src/index.ts] 214 bytes {hello-frontity} [built]
[./node_modules/@frontity/tiny-router/src/index.ts] 241 bytes {hello-frontity} [built]
[./node_modules/core-js/modules/es.string.replace.js] 3.96 KiB {hello-frontity} [built]
[./node_modules/strip-ansi/index.js] 189 bytes {hello-frontity} [built]
[./node_modules/webpack-hot-middleware/client-overlay.js] (webpack)-hot-middleware/client-overlay.js 1.79 KiB {hello-frontity} [built]
[./node_modules/webpack-hot-middleware/client.js] (webpack)-hot-middleware/client.js 6 KiB {hello-frontity} [built]
[./node_modules/webpack-hot-middleware/process-update.js] (webpack)-hot-middleware/process-update.js 3.39 KiB {hello-frontity} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {hello-frontity} [built]
[./packages/my-first-theme/src/index.js] 204 bytes {hello-frontity} [built]
+ 265 hidden modules
Child server:
Hash: 42732581c5e5f338631a
Time: 6152ms
Built at: 18/06/2021 19:30:05
Asset Size Chunks Chunk Names
server.js 7.56 MiB main [emitted] [big] main
Entrypoint main [big] = server.js
[./build/bundling/entry-points/server.ts] 388 bytes {main} [built]
[./node_modules/@frontity/core/src/server/index.ts] 2.52 KiB {main} [built]
[./node_modules/@frontity/core/src/server/middlewares/error-handling.ts] 500 bytes {main} [built]
[./node_modules/@frontity/core/src/server/middlewares/scripts-stats.ts] 593 bytes {main} [built]
[./node_modules/@frontity/core/src/server/middlewares/server-side-rendering.ts] 5.11 KiB {main} [built]
[./node_modules/@frontity/core/src/server/middlewares/settings-and-store.ts] 1.66 KiB {main} [built]
[./node_modules/@frontity/html2react/processors/script.tsx] 718 bytes {main} [built]
[./node_modules/@frontity/html2react/src/index.ts] 214 bytes {main} [built]
[./node_modules/@frontity/html2react/src/libraries/component.tsx] 7.98 KiB {main} [built]
[./node_modules/@frontity/tiny-router/src/actions.ts] 9.14 KiB {main} [built]
[./node_modules/@frontity/tiny-router/src/index.ts] 241 bytes {main} [built]
[./node_modules/core-js/modules/es.promise.js] 13.9 KiB {main} [built]
[./node_modules/koa-mount/index.js] 1.84 KiB {main} [built]
[./node_modules/koa-route/index.js] 1.19 KiB {main} [built]
[./packages/my-first-theme/src/index.js] 204 bytes {main} [built]
+ 472 hidden modules
i 「wdm」: Compiled successfully.
You are trying to use autoFetch but no source package is installed.
Visit https://community.frontity.org for help! 🙂
codemonkeynorth4
Did you add your packages to the frontity settings array?
yannisvmx5
You mean like this? I just did it. Had not added them before.
Thank you for your time. I went through all the commits in the tutorial and was able to fix the issue. Continuing with the creation of my first theme, although I’m struggling because of a lack of basic JS. Only way to learn!