Skip to content

build(ci): add ejs devDependency (fixes CI 'Cannot find module ejs') - #427

Merged
gkbishnoi07 merged 3 commits into
angular-zard-migrationfrom
fix/ci-add-ejs-dependency
Jul 24, 2026
Merged

build(ci): add ejs devDependency (fixes CI 'Cannot find module ejs')#427
gkbishnoi07 merged 3 commits into
angular-zard-migrationfrom
fix/ci-add-ejs-dependency

Conversation

@gkbishnoi07

Copy link
Copy Markdown

Problem

Deploying for QA, npm run build-ci fails:

Error: Cannot find module 'ejs'
  at .../scripts/ci-prebuild.js:28

Cause

scripts/ci-prebuild.js does require('ejs') to render environment.ci.ts.template, but ejs was never declared in package.json. It was only available transitively through an Angular-16-era build dependency. The Angular 16→20 upgrade removed/updated that package, so ejs is no longer in node_modules and CI breaks at the prebuild step.

Fix

Add ejs@^6.0.1 to devDependencies (build-time tool).

Verified

  • ci-prebuild.js renders environment.ci.ts with 0 unrendered EJS tags
  • full npm run build-ci completes green (exit 0)
  • ejs 6.0.1 confirmed the legitimate package (mde/ejs); ejs.render() API unchanged across majors

Node note for QA: Angular 20 needs Node 20.19+/22.12+/24 — your Node 24 is fine.

scripts/ci-prebuild.js requires 'ejs' to render environment.ci.ts.template,
but ejs was never declared in package.json — it was only present transitively
via an Angular-16-era build package. The 16->20 upgrade dropped that package,
so CI (build-ci) failed with 'Cannot find module ejs' during ci-prebuild.

Add ejs ^6.0.1 to devDependencies (build-time only). Verified: ci-prebuild
renders environment.ci.ts with 0 unrendered tags and full 'npm run build-ci'
completes green.
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5cc16224-7a89-4acf-939a-8d7c4307c2cc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Angular 20 requires Node ^20.19 || ^22.12 || ^24; the .nvmrc still pinned
v18 (Angular-16 leftover), which cannot build the app. Bump to 22 (LTS) so
'nvm use' selects a supported version for local dev and CI.
npm run lint reported 599 prettier/prettier errors across 78 component
templates. The pre-commit hook only runs eslint --fix on src/**/*.ts, so
HTML templates accumulated formatting drift the migration never caught.
Ran npm run lint:fix — pure whitespace/attribute-wrapping changes, no logic.
Lint now passes (0 errors); build-dev verified green.
@sonarqubecloud

Copy link
Copy Markdown

@gkbishnoi07
gkbishnoi07 merged commit f43a010 into angular-zard-migration Jul 24, 2026
3 checks passed
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