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
Reactjs React应用程序赢得';不要部署到Heroku_Reactjs_Heroku_Heroku Cli - Fatal编程技术网

Reactjs React应用程序赢得';不要部署到Heroku

Reactjs React应用程序赢得';不要部署到Heroku,reactjs,heroku,heroku-cli,Reactjs,Heroku,Heroku Cli,我已经创建了一个React应用程序,其后端使用节点。由于某些原因,我似乎无法成功地推动Heroku。我已将以下脚本添加到我的存储库根目录中的package.json文件中: "scripts": { "client-install": "npm install --prefix client", "start": "node server.js", "server": "nodemon server.js", "client": "npm start --prefix client", "dev

我已经创建了一个React应用程序,其后端使用节点。由于某些原因,我似乎无法成功地推动Heroku。我已将以下脚本添加到我的存储库根目录中的package.json文件中:

"scripts": {
"client-install": "npm install --prefix client",
"start": "node server.js",
"server": "nodemon server.js",
"client": "npm start --prefix client",
"dev": "concurrently \"npm run server\" \"npm run client\"",
"heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix }
当我运行heroku logs--tail时,它告诉我构建成功,但随后抛出以下错误:

2020-02-06T03:59:24.000000+00:00 app[api]: Build succeeded
2020-02-06T03:59:30.128450+00:00 heroku[web.1]: Starting process with command bin/boot
2020-02-06T03:59:32.080167+00:00 app[web.1]: ls: cannot access '/app/build/static/js/*.js': No such file or directory
2020-02-06T03:59:32.080964+00:00 app[web.1]: Error injecting runtime env: bundle not found '/app/build/static/js/*.js'. See: https://github.com/mars/create-react-app-buildpack/blob/master/README.md#user-content-custom-bundle-location
这是想告诉我什么?显然,有些文件还没有找到或不存在,但它的意义是什么?我该如何解决这个问题


以下是完整的代码:

您可以尝试更改“heroku postbuild”吗:“NPM\u CONFIG\u PRODUCTION=false NPM install--prefix client&&NPM run build--prefix client(在heroku postbuild中的build命令中添加
client
之后--prefix)哦,我的脚本输入错误。我已经将其设置为该值了