Infinity npm i when deploy to Azure

System Information
  • Strapi Version: 4.12.4
  • Operating System: MacOS
  • Database: postgres
  • Node Version: v20.8.0
  • NPM Version: 10.1.0

I’m trying to deploy my Strapi API to Azure and having an issue. Azure offers only Node.js versions 16 and 18. Since I’m using Strapi version 4.3.9 or higher, I need to use Node.js version 18. However, when I attempt to run npm install, I encounter the following problem:

2023-10-03T17:21:13.142Z - Using Node version:

2023-10-03T17:21:13.198Z - v18.17.1

2023-10-03T17:21:13.264Z - Using Npm version:

2023-10-03T17:21:13.418Z - 10.2.0

2023-10-03T17:21:13.475Z - Running 'npm install'...

2023-10-03T17:22:24.794Z - npm WARN deprecated source-map-url@0.4.1: See

2023-10-03T17:22:25.061Z - npm WARN deprecated urix@0.1.0: Please see

2023-10-03T17:22:25.277Z - npm WARN deprecated mailcomposer@3.12.0: This project is unmaintained

2023-10-03T17:22:25.335Z - npm WARN deprecated resolve-url@0.2.1:

2023-10-03T17:22:25.632Z - npm WARN deprecated source-map-resolve@0.5.3: See

2023-10-03T17:22:25.824Z - npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes:

2023-10-03T17:22:26.362Z - npm WARN deprecated buildmail@3.10.0: This project is unmaintained

Afterward, there is no progress for the next 3-5 minutes, and then I receive a notification in Azure with the following error:

Error code: Client Closed Request
Message: The connection was closed by the client, but the server is still processing their request for “Microsoft.Web”.

It turned out that it was necessary to choose a more powerful server

It also can depend on how you are doing your deployment. I have posted my notes on the steps I needed to take to get it working.