Unable to load _dash-layout and _dash-dependencies from dash app running behind Nginx

My response from this GitHib thread:

I believe Dash doesn’t know that you’ve configured nginx with the additional app route prefix, so you need to make it aware of that. Try initialising the Dash instance with requests_pathname_prefix='/app/dashapp/' .

This forum thread looks like it could be relevant to your situation: Host dash under alternate path

And @kanishka’s response:

Hi @ned2 , thanks for the reply. I incorporated your suggestion and added requests_pathname_prefix='/app/dashapp/' . The dash UI is stuck and displayed Loading . Upon inspecting, I got this error in console

Uncaught ReferenceError: DashRenderer is not defined

I am attaching full error trace below