My Link To Manifest.json In Index.html Works When I Run React Script 'yarn Start', But Not When I Run 'python3 Manage.py Runserver'
Solution 1:
I had the same issue and found this Can't get rid of missing manifest.json error
Well, in my case it was browser cache related and swapping to incognito mode was enough.
Solution 2:
The same happened to me (blank page and unable to load manifest.json
+ react build's static files) and I solved the issues thanks to this excellent article
Solution -> assuming your react app (build
etc.) are in a folder called frontend
at the same level as your django project, in your settings.py
file you need to make sure your STATICFILES_DIRS
variable is set like below (don't forget the trailing coma as it is a tuple).
STATICFILES_DIRS = (
os.path.join(os.path.join(BASE_DIR, 'frontend'), 'build', 'static'),
)
Solution 3:
In urls.py:
from django.urls import re_path
CHANGE: urlpatterns = [ ... path('', TemplateView.as_view(template_name='index.html')]
TO:
urlpatterns = [ ... re_path('.*', TemplateView.as_view(template_name='index.html')]
Had the same error and worked for me.
Post a Comment for "My Link To Manifest.json In Index.html Works When I Run React Script 'yarn Start', But Not When I Run 'python3 Manage.py Runserver'"