Skip to content

Fix Kan build failure (TS7016 nodemailer) - #14856

Merged
tremor021 merged 1 commit into
mainfrom
fix/kan-build-dev-deps
Jun 1, 2026
Merged

Fix Kan build failure (TS7016 nodemailer)#14856
tremor021 merged 1 commit into
mainfrom
fix/kan-build-dev-deps

Conversation

@michelroegl-brunner

@michelroegl-brunner michelroegl-brunner commented Jun 1, 2026

Copy link
Copy Markdown
Member

✍️ Description

Kan install/update fails at pnpm build --filter=@kan/web because @kan/email cannot compile: TypeScript reports TS7016 for nodemailer (missing declaration file).

The upstream Kan repo already includes @types/nodemailer in devDependencies. Our scripts source /opt/kan/.env (which sets NODE_ENV=production) before pnpm install, so pnpm skips devDependencies.

This PR adds --prod=false to pnpm install in install/kan-install.sh and ct/kan.sh so dev deps (including @types/nodemailer, typescript, and workspace tooling) are installed for the build. Runtime still uses NODE_ENV=production via systemd EnvironmentFile.

🔗 Related Issue

Fixes #

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to script metadata (PocketBase/website data).
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

Sourcing .env sets NODE_ENV=production, which caused pnpm to skip devDependencies including @types/nodemailer. Add --prod=false to pnpm install in kan-install.sh and ct/kan.sh so @kan/email compiles during the monorepo build.

Co-authored-by: Cursor <cursoragent@cursor.com>
@michelroegl-brunner
michelroegl-brunner requested a review from a team as a code owner June 1, 2026 13:34
@github-actions github-actions Bot added update script A change that updates a script bugfix labels Jun 1, 2026
@tremor021
tremor021 merged commit 06cf2ec into main Jun 1, 2026
3 checks passed
@github-actions
github-actions Bot deleted the fix/kan-build-dev-deps branch June 3, 2026 09:16
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugfix update script A change that updates a script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants