throw err in theme-folder\react-folder\nodule_modules\@devloco\react-scripts-wptheme\scripts\wpstart.js:19
Hello to anyone reading this (I'm guessing no one since this project looks pretty inactive at this point, still want to give it one last try before I move on to other options for integrating React with WordPress).
Initially I was creating a headless WordPress website using React as the frontend, it's for my portfolio and blog. I was thinking of going this route because it's simpler to pull in WP specific widgets and components versus recreating too many elements or querying many objects to get things on the posts pages specifically. I want to know if anyone understands that error I'm showing in the screenshots and has a solution?
I'd rather not waste my time if the project is no longer being supported with the modern versions of Node, webpack, and React, please let me know if anyone is around!
Hi @daquanwright did you make any progress with this? I am a designer with Wordpress but learning react.js and how I could integrate it with WP. I am very new to React. Have you also considered using AI if it might help? Also if you have found other more current solutions, please could you loop me in?
Thank you.
I had the same issue and only half solved it. I ran "npm update", then "npm audit fix --force". This got rid of the current error and the second one I ran into, but has given me a new one in place of those two.
react-src\node_modules\@devloco\react-scripts-wptheme\scripts\wpstart.js:19
throw err;
^
TypeError: Cannot read properties of undefined (reading 'compilation')
Hi @daquanwright did you make any progress with this? I am a designer with Wordpress but learning react.js and how I could integrate it with WP. I am very new to React. Have you also considered using AI if it might help? Also if you have found other more current solutions, please could you loop me in?
Thank you.
Hello @jerryagenyi,
Ahhh how interesting....that I would receive questions about if I found a fix before someone actually gave me one lmao (I guess that shows the state of this project huh). No dice....TRUST ME I tried googling for DAYS to no success no matter what stone I turned lol. It was agonizing and it was clear this hasn't been supported in a while.....just too many issues getting it to run properly in Visual Studio Code. So I'm just using the base WordPress for my portfolio and blog, as I don't want to waste too much time pulling every instance of API data onto my pages and posts (especially why I wanted to integrate React into WordPress as I badly need direct access to core WordPress functionality for many other things too).
Sorry about the delay.....been pretty busy between work and the holidays, hope you guys are having a blast and enjoy the New Year's (outside of this annoying, broken project of course lol).
Regards,
Daquan Wright
I had the same issue and only half solved it. I ran "npm update", then "npm audit fix --force". This got rid of the current error and the second one I ran into, but has given me a new one in place of those two.
react-src\node_modules\@devloco\react-scripts-wptheme\scripts\wpstart.js:19 throw err; ^ TypeError: Cannot read properties of undefined (reading 'compilation')
Hey @jessegraddy91,
I strongly recommend you save your sanity and move on from this if you haven't already....only the luck and/or technical prowess of Buddha will help you through this! Like you I hit error upon error, you would lose most of your hair before you got this broken project going lol. That's why I'm using core WordPress for my website and reserving React for my actual projects only now (where I don't have to retrieve godly amounts of API data for all the stuff I'll want to setup!
Cheers and Happy New Year's!
Regards,
Daquan Wright
Haha thanks, yes I decided to move on from trying this one. There's other ways to use react with wordpress but its not all that important I use react right now. It was more of a what if I can get this working situation.
Take care and happy new year to you too!