Closed vighnesh153 closed 1 year ago
Hey @vighnesh153, thanks for opening the issue. One thing I noticed is that your build.sh file is using zsh as the shell, while GitHub Actions is using bash. Could you try switching the shell in the build.sh to bash?
OMG!!!
That worked. I cannot believe this was the issue. All this time, I kept thinking that sh: 1: ./build.sh: not found
meant that it is not able to locate the build.sh
file.
Apologies for this and thanks for looking at this for me.
Just a follow up question, does Vercel also use bash
because I got the same error when I tried to deploy my app on Vercel.
I believe so, but I'll double check!
What version of Turborepo are you using?
1.9.3
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Describe the Bug
I have an app which has a local build script.
In the npm scripts of the app, I have a npm build script which runs the local build script.
When I run root's build script which runs
turbo run build
, my custom build shell script gets triggered. But when I run it in a CI environment or on Vercel, it is not able to find the shell script.Here is a link to the failed Github Action run: https://github.com/vighnesh153/turbo-repo-build-check/actions/runs/4999749583/jobs/8956403830#step:5:15
Output when running locally
Output when running on a CI environment or Vercel
Expected Behavior
Local script should be detected in packages.
To Reproduce
Clone the repository from the
Reproduction Repo
sectionRun
npm install
Run
npm run build
(Works locally)To reproduce this issue, run the above commands in a CI environment or on Vercel.
Reproduction Repo
https://github.com/vighnesh153/turbo-repo-build-check