Cant cd into folder during heroku deployment

Viewed 1488

I am trying to deploy my MERN stack to Heroku but there is an error when I try 'git push heroku master' saying 'sh: 1: cd: can't cd to ../react-front'. My Folder 'app' has two folders: 'node-api' and 'react-front'. In the node-api, package.json file, I have the line "heroku-postbuild": "cd ../react-front && npm install && npm run build" which is giving this error. How do I fix this?

1 Answers

try it: 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"
    }

Dont't change heroku default build command

Related