Skip to content

build: install frontend dependencies when missing or stale - #20

Merged
boeboe merged 1 commit into
mainfrom
build-npm-ci-when-needed
Nov 9, 2026
Merged

boeboe merged 1 commit into
mainfrom
build-npm-ci-when-needed

Conversation

@boeboe

@boeboe boeboe commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

`make build` failed on a checkout without `frontend/node_modules` (`sh: vite: command not found`); it only worked where `npm ci` had been run once by hand.

  • The `frontend` and `frontend-check` targets (and `frontend-coverage` where present) now depend on npm's install stamp `frontend/node_modules/.package-lock.json`. It is rebuilt with `npm ci` when missing or older than `package.json` / `package-lock.json`, so a fresh clone or a `git pull` that changed the lock file installs first, and other builds skip it. Without npm the target says to install Node.js 22.
  • `make frontend-install` still forces a clean `npm ci` (CI calls it); README and CONTRIBUTING mark it optional.

Same change as otfabric/iec61850-explorer#3.

Verified from a fresh clone (no `node_modules`): `make build` installs and builds the binaries, a second `make frontend` does not reinstall, `make frontend-check` passes, `make frontend-install` still runs `npm ci`.

🤖 Generated with Claude Code

make build failed on a checkout without frontend/node_modules (sh: vite:
command not found). The frontend targets now depend on npm's install
stamp (node_modules/.package-lock.json) and run npm ci when it is
missing or older than package.json or package-lock.json. make
frontend-install still forces a clean npm ci (CI uses it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boeboe
boeboe merged commit 07216fb into main Nov 9, 2026
59 of 61 checks passed
@boeboe
boeboe deleted the build-npm-ci-when-needed branch November 9, 2026 06:04
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