heroku - 在 heroku 部署期间无法 cd 进入文件夹

我正在尝试将我的 MERN 堆栈部署到 Heroku,但是当我尝试“git push heroku master”说“sh: 1: cd: can't cd to ../react-front”时出现错误。 我的文件夹“app”有两个文件夹:“node-api”和“react-front”。在 node-api, package.json 文件中,我有一行 "heroku-postbuild": "cd ../react-front && npm install && npm run build" 这是给这个错误。我该如何解决这个问题?

最佳答案

尝试一下:npm run deploy:full

    "scripts": {
        "build:ui": "cd ../react-front && npm install && npm run build",
        "deploy": "git push heroku master",
        "deploy:full": "npm run build:ui && git add . && git commit -m uibuild && npm run deploy"
    }

不要改变heroku默认的build命令

https://stackoverflow.com/questions/62515518/

相关文章:

python - vscode 中的调试测试在容器内失败

apache-kafka - 为什么 KSQL 查询从流-流连接创建的流中返回空值?

postgresql - 无法使用 deno.js 连接到 postgres

ios - Moya+Alamofire POST 请求在应用程序之间切换或进入后台时超时

java - 如何在 Tycho 构建中设置 Java 编译器兼容性?

android - React Native & Socket.io - 无法在应用程序和服务器之间

python - 如何在 python 中使用 altair 包加载和绘制 csv 文件?

git - $(NugetPackageRoot) 宏在 VS2019 中自动更改为 *.sfpro

node.js - 如何在 Couchbase NodeJS SDK 3X 中设置 operatio

reactjs - 具有类型支持的可重用 api Hook