Skip to content

Netlify deploy error due to missing pre-build script in package.json - #1

Merged
fylcr merged 1 commit into
mainfrom
agent-script-in-packagejson-e457
Apr 19, 2026
Merged

fylcr merged 1 commit into
mainfrom
agent-script-in-packagejson-e457

Conversation

@netlify-coding

Copy link
Copy Markdown

🔗 View agent run: https://app.netlify.com/projects/4h-project-page/agent-runs/69e4a2ff4d6330e2f193e457

🤖 Agent: Claude

💬 Prompt: The Netlify deploy errored, with the following guidance provided:

Diagnosis

  • The build command configured in Netlify is running "pnpm --filter ./apps/project-page run pre-build" (line 76 and line 91).
  • pnpm fails because the sel...

✅ Result: The Netlify deploy failed because its configured build command pnpm --filter ./apps/project-page run pre-build referenced a script that did not exist in apps/project-page/package.json, producing ERR_PNPM_RECURSIVE_RUN_NO_SCRIPT.

The fix added a pre-build script to apps/project-page/package.json that runs PUBLIC_PRE_BUILD=true astro build, matching the convention already used by apps/home-page. This keeps the Netlify UI build command unchanged and preserves the existing behavior where the PUBLIC_PRE_BUILD flag — consumed by apps/project-page/src/i18n/utils.ts to switch language URLs to the pre. / pre-<lang>. subdomains — is set for pre-production deploys.

No other files were modified.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Apr 19, 2026 •

Copy link
Copy Markdown

Deploying 4h-project-page with  Cloudflare Pages  Cloudflare Pages

Latest commit: b686754
Status: ✅  Deploy successful!
Preview URL: https://3b5fd63d.4h-project-page.pages.dev
Branch Preview URL: https://agent-script-in-packagejson.4h-project-page.pages.dev

View logs

@netlify

netlify Bot commented Apr 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for 4h-project-page ready!

Name Link
🔨 Latest commit b686754
🔍 Latest deploy log https://app.netlify.com/projects/4h-project-page/deploys/69e4a3cf58a9040008fd463d
😎 Deploy Preview https://deploy-preview-1--4h-project-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100
Accessibility: 95
Best Practices: 100
SEO: 80
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message that will be displayed on users' first pull request

@netlify

netlify Bot commented Apr 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for 4h-home-page ready!

Name Link
🔨 Latest commit b686754
🔍 Latest deploy log https://app.netlify.com/projects/4h-home-page/deploys/69e4a3cf6a7fed0008a74a0e
😎 Deploy Preview https://deploy-preview-1--4h-home-page.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100
Accessibility: 95
Best Practices: 100
SEO: 80
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@fylcr
fylcr merged commit afbc925 into main Apr 19, 2026
10 checks passed
@fylcr
fylcr deleted the agent-script-in-packagejson-e457 branch April 19, 2026 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants