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
Json 将react应用程序推送到heroku时,纱线不断重复_Json_Reactjs_Express_Heroku_Hosting - Fatal编程技术网

Json 将react应用程序推送到heroku时,纱线不断重复

Json 将react应用程序推送到heroku时,纱线不断重复,json,reactjs,express,heroku,hosting,Json,Reactjs,Express,Heroku,Hosting,当我尝试将react应用程序推送到Heroku时,它运行的是“纱线”,但下面这句话一直在重复 $ cd ./frontend && yarn remote: yarn install v1.22.10 remote: [1/4] Resolving packages... remote: success Already up-to-date. remote: $ cd ./frontend && yarn r

当我尝试将react应用程序推送到Heroku时,它运行的是“纱线”,但下面这句话一直在重复

$ cd ./frontend && yarn
remote:        yarn install v1.22.10
remote:        [1/4] Resolving packages...
remote:        success Already up-to-date.
remote:        $ cd ./frontend && yarn
remote:        yarn install v1.22.10
remote:        [1/4] Resolving packages...
remote:        success Already up-to-date.
remote:        $ cd ./frontend && yarn
remote:        yarn install v1.22.10
remote:        [1/4] Resolving packages...
remote:        success Already up-to-date.
我有一个server.js,它在express上运行,但我认为这不是问题所在。 React之外的package.json中的步骤是:

{
  "name": "aras",
  "version": "1.0.0",
  "description": "mafia video game",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "start": "PROD=true node server.js",
    "postinstall": "cd ./frontend && yarn"
  },
  "dependencies": {
    "dotenv": "^8.2.0",
    "express": "^4.17.1",
    "socket.io": "^4.0.1",
    "uuid": "^8.3.2"
  }
}
当我将cd放入react应用程序时,package.json中的步骤如下:

"scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "postinstall": "yarn build"
  },
我曾尝试删除纱线和节点模块,并再次安装它们,但没有任何效果。 注意:前端目录是我的react应用程序,server.js是express