diff options
-rw-r--r-- | cli/npm/managed/mod.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cli/npm/managed/mod.rs b/cli/npm/managed/mod.rs index 1479643e7..0625911d3 100644 --- a/cli/npm/managed/mod.rs +++ b/cli/npm/managed/mod.rs @@ -604,6 +604,9 @@ impl CliNpmResolver for ManagedCliNpmResolver { .collect::<Vec<_>>(); package_reqs.sort_by(|a, b| a.0.cmp(&b.0)); // determinism let mut hasher = FastInsecureHasher::new(); + // ensure the cache gets busted when turning nodeModulesDir on or off + // as this could cause changes in resolution + hasher.write_hashable(self.fs_resolver.node_modules_path().is_some()); for (pkg_req, pkg_nv) in package_reqs { hasher.write_hashable(&pkg_req); hasher.write_hashable(&pkg_nv); |