0

I have some problems with the deployment of my React.js application on the web.

I tried with azure and with pivotal DevOps environment. Both don't work.

I don't call any websocket. The only externals connections are with firebase (npm package) and maybe with some others npm package. All others static links (js and css files) are with https protocol.

My website is currently deployed below:

https://smad-app.cfapps.io/ Image of the website

If I deploy in local with "serve -s build". I have any errors.

Do you have any tips or steps to fix/debug my deployment ?

alexdess
  • 115
  • 1
  • 11

1 Answers1

1

To solve my problem, I did the following steps according to this post to fix my problem:

  1. Open my_project_root\node_modules\react-dev-utils\webpackHotDevClient.js
  2. Change the connection object with the following lines:

    // Connect to WebpackDevServer via a socket.
    var connection = new WebSocket(
        url.format({
            protocol: window.location.protocol === 'https:' ? 'wss' : 'ws',
            hostname: window.location.hostname,
            port: window.location.port,
            // Hardcoded in WebpackDevServer
            pathname: '/sockjs-node',
            slashes: true,
            })
    );
    
alexdess
  • 115
  • 1
  • 11