Skip to content

ui: run npm install when package-lock.json is newer than node_modules#24171

Merged
ServeurpersoCom merged 1 commit into
ggml-org:masterfrom
ServeurpersoCom:fix/ui-npm-stale-node-modules
Jun 5, 2026
Merged

ui: run npm install when package-lock.json is newer than node_modules#24171
ServeurpersoCom merged 1 commit into
ggml-org:masterfrom
ServeurpersoCom:fix/ui-npm-stale-node-modules

Conversation

@ServeurpersoCom
Copy link
Copy Markdown
Contributor

Overview

This PR makes ui-assets.cmake rerun npm install whenever package-lock.json is newer than the node_modules/.package-lock.json marker that npm writes on every successful install. Same timestamp comparison technique already used by npm_build_should_skip. No extra install on up-to-date trees.

Additional information

Follow-up to #24119 (reported by @el00ruobuob): when node_modules predates that PR, the build script skips npm install (it only runs it when node_modules is missing), so the new @vitest/browser-playwright import in vite.config.ts fails with ERR_MODULE_NOT_FOUND.

Testing

With -DLLAMA_BUILD_UI=ON and no pre-built assets in tools/ui/dist (otherwise the npm path is skipped):

  • touch tools/ui/package-lock.json then rebuild llama-ui-assets: npm install runs
  • rebuild again without changes: install skipped

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES - Disposable container for idempotent reproduction + manual validation

@github-actions github-actions Bot added the script Script related label Jun 5, 2026
@allozaur allozaur requested a review from CISC June 5, 2026 12:41
@ServeurpersoCom ServeurpersoCom merged commit 2016bf2 into ggml-org:master Jun 5, 2026
22 of 23 checks passed
jimbothigpen pushed a commit to jimbothigpen/llama.cpp that referenced this pull request Jun 6, 2026
jimbothigpen pushed a commit to jimbothigpen/llama.cpp that referenced this pull request Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

script Script related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants