From 15f14630ff1e44752c6aecc66032b12e5b732da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 25 Nov 2024 14:42:34 +0000 Subject: [PATCH] fix(init): always force managed node modules (#27047) Closes https://github.com/denoland/deno/issues/27045 --- cli/tools/init/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/tools/init/mod.rs b/cli/tools/init/mod.rs index 8f486dad53..25b86cb957 100644 --- a/cli/tools/init/mod.rs +++ b/cli/tools/init/mod.rs @@ -9,6 +9,7 @@ use crate::args::RunFlags; use crate::colors; use color_print::cformat; use color_print::cstr; +use deno_config::deno_json::NodeModulesDirMode; use deno_core::anyhow::Context; use deno_core::error::AnyError; use deno_core::serde_json::json; @@ -288,6 +289,7 @@ async fn init_npm(name: &str, args: Vec) -> Result { }, allow_scripts: PackagesAllowedScripts::All, argv: args, + node_modules_dir: Some(NodeModulesDirMode::Auto), subcommand: DenoSubcommand::Run(RunFlags { script: script_name, ..Default::default()