geertschneider
Forum Replies Created
-
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] 404 when going to the appHi,
thanks for you feedback!
I think it is not linked to package.json, those files (and nodeJS) are only needed when running in development mode.
I have published my build folder to the wp-content/reactpress/apps/ folder.
So it does not need nodeJS / package.json.
My guess is that the plugin checks those files to know if it should run in development mode or in production ? Once a build is made, react just does client side rendering.I have the impression there is nothing which gets rendered for one reason or another.
- This reply was modified 4 years ago by geertschneider.
Forum: Plugins
In reply to: [ReactPress - Create React App for Wordpress] 404 when going to the appThe page does existing – I can see it in the list of pages.
When I do “view page” from the WP Admin -> it does show me a page without a 404.
I get the 404 if I click the SLUG in the ReactPress-plugin window.In the logs I see this :
[01-May-2022 18:38:00 UTC] PHP Warning: file_get_contents(/var/www/html/wp-content/reactpress/apps/testreactpress/package.json): failed to open stream: No such file or directory in /var/www/html/wp-content/plugins/reactpress/admin/class-reactpress-admin.php on line 487 [01-May-2022 18:38:00 UTC] PHP Warning: file_put_contents(/var/www/html/wp-content/reactpress/apps/testreactpress/public/index.html): failed to open stream: No such file or directory in /var/www/html/wp-content/plugins/reactpress/admin/class-reactpress-admin.php on line 334Which is maybe not an issue as I have put my build folder (I don’t need to do interactive development).
I run wordpress in a container (wordpress:latest).
And I did nothing – just create-react-app / followed by build.
Strange that it does not work.
I see this when I edit the page :
<!– Please don’t change. Block is needed for React app. –>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id=”root”></div>So it does something…
In the javascript console (browser) I don’t find any error / messages.