Skip to content

Install npm packages in the frontend command - #858

Merged
jsnmrs merged 1 commit into
mainfrom
frontend-npm-ci
Nov 1, 2026
Merged

jsnmrs merged 1 commit into
mainfrom
frontend-npm-ci

Conversation

@jsnmrs

@jsnmrs jsnmrs commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • ddev frontend only ran npm run build, so after a PR that changed package-lock.json the local node_modules stayed on the old versions and the build silently used them. After the frontend group bump in Bump the frontend group with 7 updates #856, all 7 bumped packages were still at their previous versions locally.
  • The command now runs npm ci first. It passes --ignore-scripts because package.json has a postinstall hook that runs the build, which would otherwise build the CSS twice. The build then runs explicitly once.
  • Update the README's description of the command.

Testing

  • ShellCheck passes.
  • ddev frontend installs 167 packages, npm ls reports no version mismatches, and the build runs once with styles.css unchanged.
  • The accessibility scan workflow calls ddev frontend and later runs its own npm ci on the runner, which is unaffected by this change.

ddev frontend only ran the build, so after a PR that changed package-lock.json the local node_modules stayed on the old versions and the build used them. Run npm ci first, skipping lifecycle scripts so the postinstall hook does not build the CSS a second time.
@jsnmrs jsnmrs added the patch label Nov 1, 2026
@jsnmrs
jsnmrs merged commit 92378a9 into main Nov 1, 2026
4 checks passed
@jsnmrs
jsnmrs deleted the frontend-npm-ci branch November 1, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant