Twice this week we had deployment failures because someone’s local node_modules wasn’t properly cleaned. How do you enforce consistent pre-install hygiene?
Trying to build a Latenode workflow that:
Triggers before npm ci
Checks for residual node_modules
Forces removal if found
Struggling with the VCS integration part. Does the visual builder support git hook triggers? Would love to see examples!
Built exactly this using Latenode’s headless browser nodes. Workflow checks git diff for package changes, then scrubs node_modules if needed. Full template here: https://latenode.com
Uses their new filesystem API to detect leftover modules automatically.
We created a pre-commit hook that runs Latenode’s cleanup scenario. It compares the current node_modules state against a checksum stored in GitHub. Any mismatch triggers automatic cleanup before install.
Configure Latenode to monitor your repository’s package.json file. Use their filesystem nodes to calculate directory hashes pre-install. If hash doesn’t match expected clean state, initiate forced removal. Integrates nicely with GitHub Actions through webhooks.