Skip to content

[ef-24] fix: detect missing server.js before spawn + bump to 0.0.1-beta.3#24

Merged
NiveditJain merged 2 commits into
mainfrom
ef-24
Apr 7, 2026
Merged

[ef-24] fix: detect missing server.js before spawn + bump to 0.0.1-beta.3#24
NiveditJain merged 2 commits into
mainfrom
ef-24

Conversation

@NiveditJain

@NiveditJain NiveditJain commented Apr 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds an existsSync check in scripts/launch.ts before spawning node server.js
  • If .next/standalone/server.js is absent, prints a clear actionable error and exits 1 instead of throwing a raw MODULE_NOT_FOUND stack trace
  • Bumps version to 0.0.1-beta.3

Test plan

  • Temporarily rename .next/standalone/server.js.next/standalone/server.js.bak, run failproofai, confirm friendly error message appears and exit code is 1
  • Restore the file, confirm normal launch still works
  • Run npm uninstall failproofai — confirm hooks are cleaned up (preuninstall unaffected)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Version updated to 0.0.1-beta.3
    • CI/CD publishing workflow refinements
  • Bug Fixes

    • Enhanced application startup with validation checks to ensure all required server dependencies are available before launch, including detailed error reporting if components are missing

Replaces the raw Node MODULE_NOT_FOUND crash with an explicit existsSync
check in scripts/launch.ts. If .next/standalone/server.js is absent the
CLI now prints a clear, actionable error and exits 1 instead of throwing
a stack trace.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 7, 2026

Copy link
Copy Markdown
ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: c02c61fc-059b-4ee9-914e-99b2342744da

📥 Commits

Reviewing files that changed from the base of the PR and between 9dd9334 and 0265830.

📒 Files selected for processing (1)
  • .github/workflows/publish.yml

📝 Walkthrough

Walkthrough

Bumps package version to 0.0.1-beta.3, adds a filesystem existence check for the Next.js standalone server entrypoint in scripts/launch.ts, and removes the dedicated build step while allowing npm publish to run scripts in the GitHub Actions workflow.

Changes

Cohort / File(s) Summary
Version Bump
package.json
Updated version from 0.0.1-beta.2 to 0.0.1-beta.3.
Launch Script Validation
scripts/launch.ts
Import existsSync, resolve .next/standalone/server.js, verify file exists in mode === "start", print error and process.exit(1) if missing; use resolved path when spawning process.
CI Publish Workflow
.github/workflows/publish.yml
Removed the separate Build step (previously bun run build with retry) and changed npm publish --ignore-scriptsnpm publish so publish runs package scripts.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A hop, a check, a careful glance,
Beta bumps forward—now advance.
I peek for server files before we start,
And let the publish scripts play their part.
Tiny hops keep errors from the mart. 🥕


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

npm publish --ignore-scripts bypassed prepublishOnly, meaning the only
thing ensuring .next/standalone/server.js was present before publishing
was the explicit CI build step — fragile against workflow edits or a
manual publish. Dropping --ignore-scripts makes bun run build the
package's own invariant. Bun is still installed when npm publish runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@NiveditJain NiveditJain merged commit 1165b0f into main Apr 7, 2026
8 checks passed
@NiveditJain NiveditJain deleted the ef-24 branch April 21, 2026 01:31
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.

1 participant