Hi there. This looks like a great product, but first exposure to it, through this tutorial, has been frustrating - to say the least.
Tutorials are fantastic ideas as they demonstrate use cases and workflow, but only useful if they actually work!
In fact, if they don’t work, they are worse than useless; as they alienate the user towards the product from the off.
In this tutorial, as well as not fixing the comments above, which you said you would do 26 days ago, there are quite a few other breaking problems:
-
You constantly refer to the Strapi endpoint as localhost:1337/posts, both in the text and the code. It is not. It actually is localhost:1337/api/posts - The one you specify just returns a 404.
-
The screen shots of setting user permissions do not match the actual screen - in the version I am using (4.0.7) it is completely different to you screenshots. Also, there is no count option for posts on my version.
-
I have had to add
renderers: [
‘@astrojs/renderer-react’,
]
into the astro.config.mjs file to deal with the error about ‘please include a rendered to deal with JSX’ error mentioned in an earlier comment. -
And, after all that, it still doesn’t work! I now get ‘No blog posts found’ when it all runs. But if I go to http://localhost:1337/api/posts in my browser I can clearly see the JSON for 5 blog posts I have created.
-
I cannot get the lifecycle hooks to work, even after creating the api\post\models\post.js file and folder which do not exist.
PLEASE can someone actually go through this tutorial and DO IT, to check it actually works? Obviously, no one has, which is poor.
Then please correct all the errors including the ones I’m sure I haven’t found. Strapi looks like a fab product. I Really want to use it. But this does not bode well for detail or support. Thanks.