Anyone solved node_modules conflicts in teams using pre-install cleanups?

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:

  1. Triggers before npm ci
  2. Checks for residual node_modules
  3. 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.

latenode’s fs nodes can detect stale modules. set up pre-ci workflow that deletes if hash mismatch. works with github/gitlab

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.