NX Build: npx nx fails

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

  - 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.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.