• Resolved fxzh98

    (@fxzh98)


    I’m using LocalWP dev environment to try out ReactPress, looks really cool! I’ve followed the steps of creating an react app in /app/public/wp-content/reactpress/apps/[appname] and set the slug to a new page name that’s not being used.

    Checked the package.json file and when I hit yarn build it’s running PUBLIC_URL=/wp-content/reactpress/apps/cwc/build react-scripts build but every time I then go to the new page where it should live [app-name]/reactdemo there is nothing embedded, just a blank screen.

    I’ve gone to WPAdmin -> Settings -> Permalink and hit “Save Changes” but that doesn’t seem to work.

    The app can be found by going to [site_name]/wp-content/reactpress/apps/cwc/build/ it just doesn’t seem to embed into the theme itself.

    At a bit of a loss here, really like the plugin as it solves a lot of problems I’m facing at the moment so really keen to get it up and running.

    From what I can see from other posts it looks sounds like my initial build isn’t working as when I run yarn build I don’t see the page for the first time but I’m not too sure how to go about diagnosing

    UPDATE: Debugging through class-reactpress-public.php I’m seeing that $request = @file_get_contents($manifest_url); at line 155 is failing so it causing repr_load_react_app:122 function to return false. Any ideas?

    • This topic was modified 2 years, 7 months ago by fxzh98.
    • This topic was modified 2 years, 7 months ago by fxzh98.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author rockiger

    (@rockiger)

    Hey @fxzh98,

    did you modify the page where the app should be displayed manually?

    Which operating system are you using?

    I will test with the newest version of LocalWP shortly.

    Thread Starter fxzh98

    (@fxzh98)

    Hey @rockiger, I haven’t modified the page. I haven’t even created one, I just added in a new slug that isn’t being used by any other pages.

    Do I need to create a new page first and then assign it to the slug?

    I’m using MacOS Montery

    Plugin Author rockiger

    (@rockiger)

    No, no, the page does get created automatically.

    The problem is probably the php error. I will look into it and see if I can replicate it and my Linux system.

    One other question: Which php version does you use?

    Plugin Author rockiger

    (@rockiger)

    Using this settings on Linux it works fine for me:

    Screenshot-20220727-142033

    Local version is: 6.2.4

    Does the asset manifest in your react app exist?

    Thread Starter fxzh98

    (@fxzh98)

    Hmm that’s peculiar, I’m using 6.4.2 and PHP 7.4.1

    One thing that I’ve noted is that if I head to the site’s directory in file explorer there is 2 instances of reactpress routes.

    The first – [site_name]/app/public/wp-content/plugins/reactpress
    The second – [site_name]/app/public/wp-content/reactpress

    The second contains the asset-manifest.json. Should the second folder that contains the app be nested under the first route?

    • This reply was modified 2 years, 7 months ago by fxzh98.
    Plugin Author rockiger

    (@rockiger)

    No, the first one is the plugin directory.

    The second one is the content directory of the plugin, where all React apps should be stored.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can’t get initial build to work – LocalWP Dev’ is closed to new replies.