1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-11 16:42:21 -05:00

fix: replace npm install hint with deno install hint (#25244)

Needed for https://github.com/denoland/deno/pull/25213.

With Deno 2, we should suggest using `deno install` instead of `npm
install`.
This commit is contained in:
Bartek Iwańczuk 2024-08-28 03:31:41 +01:00 committed by Luca Casonato
parent 6a3471e157
commit e3c4651676
No known key found for this signature in database
GPG key ID: 01A83EB62563811F
4 changed files with 4 additions and 9 deletions

View file

@ -307,14 +307,9 @@ impl CliNpmResolver for ByonmCliNpmResolver {
concat!(
"Could not find \"{}\" in a node_modules folder. ",
"Deno expects the node_modules/ directory to be up to date. ",
"Did you forget to run `{}`?"
"Did you forget to run `deno install`?"
),
alias,
if *crate::args::DENO_FUTURE {
"deno install"
} else {
"npm install"
}
);
}

View file

@ -146,7 +146,7 @@ impl CliNodeResolver {
concat!(
"Could not resolve \"{}\", but found it in a package.json. ",
"Deno expects the node_modules/ directory to be up to date. ",
"Did you forget to run `npm install`?"
"Did you forget to run `deno install`?"
),
specifier
));

View file

@ -2430,7 +2430,7 @@ fn byonm_package_specifier_not_installed_and_invalid_subpath() {
// no npm install has been run, so this should give an informative error
let output = test_context.new_command().args("run main.ts").run();
output.assert_matches_text(
r#"error: Could not resolve "chalk", but found it in a package.json. Deno expects the node_modules/ directory to be up to date. Did you forget to run `npm install`?
r#"error: Could not resolve "chalk", but found it in a package.json. Deno expects the node_modules/ directory to be up to date. Did you forget to run `deno install`?
at file:///[WILDCARD]/main.ts:1:19
"#,
);

View file

@ -1,2 +1,2 @@
error: Could not find "chalk" in a node_modules folder. Deno expects the node_modules/ directory to be up to date. Did you forget to run `npm install`?
error: Could not find "chalk" in a node_modules folder. Deno expects the node_modules/ directory to be up to date. Did you forget to run `deno install`?
at file:///[WILDCARD]/not_installed.ts:1:19