Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 生成后REACTJS中的空白页_Node.js_Reactjs_Express_.htaccess_Build - Fatal编程技术网

Node.js 生成后REACTJS中的空白页

Node.js 生成后REACTJS中的空白页,node.js,reactjs,express,.htaccess,build,Node.js,Reactjs,Express,.htaccess,Build,我还在学习,所以请放松 我已经完成了部署和构建应用程序。但只有最初的页面显示内容。。。 又是一页,一片空白。在控制台中,他似乎找到了页面,但没有打开 此错误在控制台中出现: Uncaught SyntaxError: Unexpected token '<' 2.283742ca.chunk.js:1 Uncaught SyntaxError: Unexpected token '<' main.9ee80443.chunk.js:1 <IfModule mod_re

我还在学习,所以请放松

我已经完成了部署和构建应用程序。但只有最初的页面显示内容。。。 又是一页,一片空白。在控制台中,他似乎找到了页面,但没有打开

此错误在控制台中出现:

Uncaught SyntaxError: Unexpected token '<'  2.283742ca.chunk.js:1 
Uncaught SyntaxError: Unexpected token '<'  main.9ee80443.chunk.js:1

<IfModule mod_rewrite.c>

  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /index.html [L]

</IfModule>
app.use(express.static(path.join(__dirname, "client/build")));
app.get("*", (req, res) => {
    res.sendFile(path.join(__dirname, "client/build", "index.html"));
});