Hello.
I am facing issues similar to the ones in this post:
Welp, I still cannot manage to find how to fix the issue.
I am developping a react application, using Netlify to build & deploy the app automatically on commit. Thing is, whenever a new build is deployed in production, the client faces a blank page with this error:
This does not happen when the website is loaded for the first time by the navigator, and only happens after a new build. After a few reloads, the issue goes away and the website behaves correctly. Thus I assume this has to do with caching.
Also, I didn’t manage to reproduce the error locally. This only happens after a Netlify deployment.
index.html :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<script type="text/javascript" src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<title>Sensuba</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
</body>
</html>
Manifest.json :
{
"short_name": "Sensuba",
"name": "Sensuba",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": "./index.html",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
index.js, in the /src folder :
import React from 'react';
import { render } from 'react-dom';
import App from './components/App';
import './style/index.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import registerServiceWorker from './utility/registerServiceWorker';
import Api from './services/Api'
const api = new Api({ url: 'https://bhtwey7kwc.execute-api.eu-west-3.amazonaws.com/alpha' });
const options = { api }
render(
<App options={options} />,
document.getElementById('root')
)
registerServiceWorker();
I know this is kind of a known issue, but I didn’t find how to solve this problem in the others threads.
Website : http://sensuba.netlify.app/
Github : GitHub - Sensuba/webapp