Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to deploy a node app from a monorepo built with Turborepo in Azure App Services using Github Actions

I have a monorepo in Github that has been built with Turborepo. I want to deploy it in Azure App Service the backend app, but I'm having trouble finding out how to install turbo on Azure.

When the Github action starts running, it fails when doing npm install with this error:

npm ERR! [turbo] Failed to find package "turbo-linux-64" on the file system

I tried adding this step before building the app inside yml file:

steps:
  - name: Install Turbo CLI
    run: npm install turbo --global

but I still get the same error.

I also tried to install an Extension in App Service configuration but I don't find the option.

If I install turbo using ssh console, it won't persist, so it will fail again.

Any idea how to do this?

like image 497
Jorge Avatar asked Oct 20 '25 05:10

Jorge


1 Answers

I tried adding this step before building the app inside yml file:

Instead of Installing the turbo-linux-64inside yml file, Install it directly in the Azure Linux App Service.

Check the below steps:

Create an Azure Linux App Service with RuntimeStack as Node.

npm ERR! [turbo] Failed to find package "turbo-linux-64" on the file system

Navigate to your App Service => Advanced Tools => Go => SSH

enter image description here

Run the below command to Install the turbo-linux-64 .

 npm install turbo-linux-64

OR

Open the DebugConsole directly with the below URL.

https://YourWebAppName.scm.azurewebsites.net/

enter image description here

  • Now check the installed turbo-linux-64 version by using the npm ls turbo-linux-64 command.

enter image description here

  • Now try to run and Install the npm install turbo --global which you have tried in yml file.

enter image description here

  • I am able to Install the turbo without any issues. Check the Installed turbo version using turbo --version.

enter image description here

If I install turbo using ssh console, it won't persist, so it will fail again.

  • If you want to persist the Installed turbo, then we can add a Startup script in the App Service => Configuration => General Settings section.

  • Add the npm install turbo-linux-64 --global command in the startup script.

enter image description here

  • Whenever the Application gets started the startup script will run automatically and Install the specified Packages.

  • Save and restart the Application.

  • Now check whether the turbo is Install or not using the same command turbo --version in SSH.

  • Now deploy your application as usual from the Deployment Center.

like image 103
Harshitha Veeramalla Avatar answered Oct 21 '25 20:10

Harshitha Veeramalla