NX Build: npx nx fails

services:
  - type: web
    name: ethang-website
    env: node
    plan: starter
    buildCommand:
      npx pnpm i -D &&
      npx pnpm i -P &&
      npx prisma generate &&
      npx nx build website &&
      npx prisma db push
    startCommand: npx nx serve website
    envVars:
      - key: NODE_ENV
        value: production
      - key: DATABASE_URL
        fromDatabase:
          name: ethang-db
          property: connectionString

databases:
  - name: ethang-db
    plan: starter

Seems like npx should work with anything, no? I added dev dependency installs incase that is what’s needed.

Hi there,

When I looked up the build command, I found it set to: npx pnpm i -D && npx pnpm i -P && npx prisma generate && nx build website && npx prisma db push.

nx build website is missing the npx prefix, and this might explain the command not found: nx error log.

The Blueprint spec you’ve provided seems to have the correct build command but may not have synced with the services it manages.

A Manual Sync should fix your issue.