Hello there, Iāve got an issue that Iāve seen a couple of other similar posts about here and elsewhere on the internet, but none of the solutions have worked for me.
I finished the general tutorial yesterday, so I set out to create a new project for a Wordpress site Iām building for a client. Iām currently using Local by Flywheel to work on the site locally (and the site is running on local without issue). Iāve created a new theme folder as per the tutorial instructions, and Iāve changed my settings file to this:
const settings = {
ānameā: āandi-yoga-blogā,
āstateā: {
"frontity": {
"url": "http://yoga-with-andi.local",
"title": "Yoga With Andi Blog",
"description": "A Blog and Marketing Website For Andi Senatro Yoga"
}
},
āpackagesā: [
{
"name": "yoga-blog",
},
{
"name": "@frontity/wp-source",
"state": {
"source": {
"url": "http://yoga-with-andi.local"
}
}
},
"@frontity/tiny-router",
"@frontity/html2react"
]
};
export default settings;
Unfortunately, when trying to run the dev environment Iām greeted with the following error:
FetchError: request to http://yoga-with-andi.local/wp-json/wp/v2/posts?_embed=true&page=1 failed, reason: connect ECONNREFUSED 127.0.0.1:80
What am I missing here? I have gone through all of the other questions Iāve seen, and Iāve made sure that permalinks are set correctly in WP. I havenāt customized any other aspects of the project yet other than creating the new theme file. According to this link (which is the only good example of frontity with local by flywheel) they are able to just enter the url and it works (even though they use the deprecated api variation) Creating a Headless WordPress Site With Frontity | CSS-Tricks
If I revert it back to the default https://test.frontity.org I get the expected:
You can edit your package in:
packages/yoga-blog/src/index.js
Any help would be appreciated. Iām excited to have a simple way to implement a headless WP setup, but Iāve been trying to figure out this error for over an hour, so itās not turning out to be as simple as Iād like.