From-scratch React app on Cloud9: Impossible?

So I’ve been trying for the last week to get a from-scratch React app running on my Cloud9 workspace. I’ve scoured the web, cloned half a dozen boilerplate repos, read the official docs, followed the contained guides, asked Reddit, posted on Cloud9 and even tried to eject and deploy an app I created using create-react-app (Which is the ONLY way to configure a functional one!). But nothing will run on Cloud9! I’ve had several attempted demos say they are running on localhost, but navigating to the URL or previewing running app doesn’t go anywhere.

I’m really at the end of my rope here!

Do you mean you can’t even spin up the local version on c9 and then see it?

I was able to do it reasonably easily.

Are you using the preview button on c9 to view it?

Turns out my issue was with webpack, which is used in most React apps/setups, not letting C9’s host through its security check. I was able to fix it by disabling it in my webpack config file with

devServer: {
        disableHostCheck: true,
        // other options
    }

Which is apparently an insecure option, but it works! I’ve since got myself VSCode and am having no trouble deploying all the React apps I want on my own machine!

1 Like