diff options
Diffstat (limited to 'cli/graph_util.rs')
-rw-r--r-- | cli/graph_util.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cli/graph_util.rs b/cli/graph_util.rs index c8432b67e..8ff6c9ae3 100644 --- a/cli/graph_util.rs +++ b/cli/graph_util.rs @@ -541,7 +541,12 @@ impl ModuleGraphBuilder { ) -> Result<(), AnyError> { // ensure an "npm install" is done if the user has explicitly // opted into using a node_modules directory - if self.options.node_modules_dir_enablement() == Some(true) { + if self + .options + .node_modules_mode()? + .map(|m| m.uses_node_modules_dir()) + .unwrap_or(false) + { if let Some(npm_resolver) = self.npm_resolver.as_managed() { npm_resolver.ensure_top_level_package_json_install().await?; } |