Node.js 如何修复-重新加载页面,在React应用程序BrowserRouter.SSR.Rendertron上返回404 not dound

Node.js 如何修复-重新加载页面,在React应用程序BrowserRouter.SSR.Rendertron上返回404 not dound,node.js,reactjs,nginx,react-router,server-side-rendering,Node.js,Reactjs,Nginx,React Router,Server Side Rendering,我使用了nginx,并在服务器中使用rendertron创建了SSR,还使用BrowserRouter安装了react应用程序(因为HashRouter不会在服务器端读取)。但当我在DirectURL(www.exaplme.com/some/direct/)中重新加载页面时,它返回404页面未找到 然后,我尝试在nginx中尝试使用文件“try\u files$uri/index.html;”返回错误:未捕获语法错误:意外标记您是否在index.html中使用资源文件的相对URL?我使用rea

我使用了nginx,并在服务器中使用rendertron创建了SSR,还使用BrowserRouter安装了react应用程序(因为HashRouter不会在服务器端读取)。但当我在DirectURL(www.exaplme.com/some/direct/)中重新加载页面时,它返回404页面未找到


然后,我尝试在nginx中尝试使用文件“try\u files$uri/index.html;”返回错误:未捕获语法错误:意外标记您是否在
index.html
中使用资源文件的相对URL?我使用react路由器路由到正确的路径,如下所示。
NGINX:
server {
  ...
  location / {
    try_files $uri /index.html;
  }
}
Browse error:
Uncaught SyntaxError: Unexpected token <