diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-09-22 11:17:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-22 11:17:02 -0400 |
commit | 716005a0d4afd1042fa75d8bdc32fd13e9ebe95f (patch) | |
tree | 4c417eb7b91d6203aacba7dcd81bee3f13c0cfd3 /cli/proc_state.rs | |
parent | 9a216806d514b5f41c73c777010572cdf3c51eab (diff) |
feat(npm): add flag for creating and resolving npm packages to a local node_modules folder (#15971)
Diffstat (limited to 'cli/proc_state.rs')
-rw-r--r-- | cli/proc_state.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/cli/proc_state.rs b/cli/proc_state.rs index d3c6f2cdd..27cd0603d 100644 --- a/cli/proc_state.rs +++ b/cli/proc_state.rs @@ -241,6 +241,9 @@ impl ProcState { // don't do the unstable error when in the lsp || matches!(cli_options.sub_command(), DenoSubcommand::Lsp), cli_options.no_npm(), + cli_options + .resolve_local_node_modules_folder() + .with_context(|| "Resolving local node_modules folder.")?, ); let emit_options: deno_ast::EmitOptions = ts_config_result.ts_config.into(); @@ -513,15 +516,7 @@ impl ProcState { &self.npm_resolver, )) .with_context(|| { - format!( - "Could not resolve '{}' from '{}'.", - specifier, - self - .npm_resolver - .resolve_package_from_specifier(&referrer) - .unwrap() - .id - ) + format!("Could not resolve '{}' from '{}'.", specifier, referrer) }); } |