Strapi CLI not found

When I deploy my Strapi app to Azure, I get the error below when trying to run npm run start within my built artifact.

Error: Cannot find module '../dist/cli'
Require stack:
- /Users/myuser/Downloads/release/node_modules/.bin/strapi
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/Users/myuser/Downloads/release/node_modules/.bin/strapi' ]
}

I am really confused as to why this happens. I can see from my build pipeline that it installs all the packages just fine, runs strapi build just fine, but crashes when npm run startis run in the App Service itself (or when manually starting the built artifact).

Trying this locally (cloning repo, npm i, npm run build, npm run start, as well as running the same node+npm versions) works just fine.

Been ripping out my own hair for a while now. Would really appreciate it if someone could point me in the right direction here.

package.json

{
  "scripts": {
    "build": "strapi build",
    "start": "strapi start",
  },
  "dependencies": {
    "@strapi/plugin-cloud": "5.1.0",
    "@strapi/plugin-users-permissions": "5.1.0",
    "@strapi/strapi": "5.1.0",
    "pg": "8.8.0",
    "react": "^18.0.0",
    "react-dom": "^18.0.0",
    "react-router-dom": "^6.0.0",
    "styled-components": "^6.0.0"
  },
  "devDependencies": {
    "@types/node": "^20",
    "@types/react": "^18",
    "@types/react-dom": "^18",
    "typescript": "^5"
  },
  "engines": {
    "node": "20.x",
    "npm": ">=10.x"
  },
  "strapi": {
    "uuid": "" //commented out
  }
}

This topic has been created from a Discord post (1296396288899940454) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord