Comments on: Headless WordPress with React and NextJS (Part 2) https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/ WordPress Design and Development Agency Mon, 15 Apr 2024 15:59:15 +0000 hourly 1 https://wordpress.org/?v=6.6.2 By: Amit Rawat https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-100051 Thu, 10 Dec 2020 08:26:05 +0000 https://webdevstudios.com/?p=19398#comment-100051 Thanks, It was really helpful for me being a beginner in react.

]]>
By: Cristian Bresciani https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-89306 Tue, 24 Mar 2020 23:38:13 +0000 https://webdevstudios.com/?p=19398#comment-89306 I want daploy on centos server. I try to npm build but i have a problem a recive 503 error.

]]>
By: Terry Mitchell https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-72081 Sun, 21 Jul 2019 17:05:12 +0000 https://webdevstudios.com/?p=19398#comment-72081 In reply to Terry Mitchell.

The error is literally only being thrown in deployment – I get no messages in my console locally 🙁

]]>
By: Terry Mitchell https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-72075 Sun, 21 Jul 2019 15:33:37 +0000 https://webdevstudios.com/?p=19398#comment-72075 In reply to David Bedoya.

I’m having the same problem! Did you ever resolve this??

Thanks

Terry

]]>
By: David Bedoya https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-64613 Thu, 18 Apr 2019 21:49:45 +0000 https://webdevstudios.com/?p=19398#comment-64613 Using a WordPress API demo in dev mode works well, the issue is when i want to compile, says the following error:

“Cannot read property ‘title’ of undefined”

I was using the example repo, and i change the urls from a web hosted wordpress.

]]>
By: Emiliano https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-63142 Sun, 07 Apr 2019 21:57:38 +0000 https://webdevstudios.com/?p=19398#comment-63142 Hi! I have a doubt: how do you handle the deploy part, regarding urls and that stuff? Example: if i host my wordpress installation in Siteground, and have my front end part deployed in Now (using Next.js) how should i’m be able to make things works? Because, for example, if i alias my front end deployment to match the root url where my wordpress installation is, i can’t access to my wordpress installation anymore!

]]>
By: George https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-60151 Sat, 16 Mar 2019 03:33:29 +0000 https://webdevstudios.com/?p=19398#comment-60151 In reply to Jo Murgel.

Just to test whether it actually gets faster. Either way, postlight seemed a little clunckier than I like. Just sticking with bare nextjs 🙂

]]>
By: Jo Murgel https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-59758 Mon, 11 Mar 2019 19:17:09 +0000 https://webdevstudios.com/?p=19398#comment-59758 In reply to George.

That Postlight framework doesn’t have an explicit production mode that I’m aware of. I believe running build in the frontend would produce a production-ready setup for deployment, but deploying an app like this is slightly different than with this Next.js app in the demo. You can look at the package.json files to see what scripts you can run.

What are you trying to accomplish by running in production mode?

]]>
By: George https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-59475 Sun, 10 Mar 2019 03:41:25 +0000 https://webdevstudios.com/?p=19398#comment-59475 Jo, really helpful stuff!

After playing around with your tutorial, I decided to try out postlight as you suggested. One caveat there is that their “frontend” non-graphql build is slow. They even mention this in their readme, stating it’s due to the dev environment and would be faster in prod. I wanted to test the veracity of this claim 😛

Would you happen to know if there’s a way to run it in production mode like you did? Doing NODE_ENV=production in the start script runs into errors .

]]>
By: Jo Murgel https://webdevstudios.com/2019/01/10/headless-wordpress-with-react-and-nextjs-2/#comment-57873 Tue, 26 Feb 2019 17:18:56 +0000 https://webdevstudios.com/?p=19398#comment-57873 In reply to Abdul Rafay.

I think the reason most authors don’t go into deployment is because there’s no one way to do a deployment, especially for something like this. Next.js does have a recommendation for deployment in their docs https://nextjs.org/learn/basics/deploying-a-nextjs-app which might be helpful.

I’ll take your suggestion into consideration. Thank you.

]]>