You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to deploy in Windows, I receive the following error:
"Error: In packages\joke\joke: 'build.sh' won't run on this platform and no 'build.cmd' is provided"
Also tried with Ubuntu on Windows, the build.sh also fails:
"/bin/bash: ./build.sh: /bin/bash^M: bad interpreter: No such file or directory
Failures:
Error: While deploying action 'joke/joke': './build.sh' exited with code 126"
I am getting the above error on windows even when using --remote-build any ideas how to remote build on windows?
Command:
doctl serverless deploy sample-functions-python-jokes --remote-build
Error:
Error: In packages\joke\joke: 'build.sh' won't run on this platform and no 'build.cmd' is provided
For anyone in the future reading this, I created an empty file named build.cmd next to build.sh in the same folder.
With that empty file present it now works. Windows hey!
The fact that --remote-build does not seem to affect the logic which decides whether build.cmd or build.sh is appropriate strikes me as a bug in digitalocean/functions-deployer. I've opened issue digitalocean/functions-deployer#39 accordingly.
Activity
rabbah commentedon Jun 23, 2022
Thanks @horace-yip - we will need to create a
build.cmdfor windows to be the equivalent of the bash script. Will send a PR.horace-yip commentedon Jun 23, 2022
Thanks @rabbah. I look forward to the build.cmd.
I managed to deploy with Ubuntu on Windows. The trick is ensure the bash script line terminated with LF, not CRLF.
rabbah commentedon Jun 25, 2022
Also using
--remote-buildto trigger a build remotely would avoid any local environment divergence with cloud environment.mdu-adam-williamson commentedon Dec 13, 2022
I am getting the above error on windows even when using --remote-build any ideas how to remote build on windows?
Command:
doctl serverless deploy sample-functions-python-jokes --remote-build
Error:
Error: In packages\joke\joke: 'build.sh' won't run on this platform and no 'build.cmd' is provided
mdu-adam-williamson commentedon Dec 13, 2022
For anyone in the future reading this, I created an empty file named build.cmd next to build.sh in the same folder.
With that empty file present it now works. Windows hey!
joshuaauerbachwatson commentedon Dec 13, 2022
The fact that
--remote-builddoes not seem to affect the logic which decides whetherbuild.cmdorbuild.shis appropriate strikes me as a bug indigitalocean/functions-deployer. I've opened issue digitalocean/functions-deployer#39 accordingly.mautabar commentedon Jan 22, 2023
Open build.sh in notepad++
Edit --> EOL Conversion --> UNIX/OSX Format
and then save the file
deploy:
doctl serverless deploy sample-functions-python-jokes --remote-buildas described here: https://stackoverflow.com/a/24013333