Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2022-02-22 22:47:56 +0300
committerGitHub <noreply@github.com>2022-02-22 22:47:56 +0300
commite83e5c9bad93e598969088ae780149dbe34c6b5c (patch)
treebe67e5e6506329aa42bededa3f47d947e3816d3e /docs
parent9bdd1ace86300a8ee562027bbc5cb57d62dc7ba8 (diff)
docs: clarify npm init @latest behavior (#4435)
Closes: https://github.com/npm/cli/issues/3821
Diffstat (limited to 'docs')
-rw-r--r--docs/content/commands/npm-init.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/content/commands/npm-init.md b/docs/content/commands/npm-init.md
index a608061a9..e9212a37e 100644
--- a/docs/content/commands/npm-init.md
+++ b/docs/content/commands/npm-init.md
@@ -38,6 +38,15 @@ strictly additive, so it will keep any fields and values that were already
set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If
you pass `--scope`, it will create a scoped package.
+*Note:* if a user already has the `create-<initializer>` package
+globally installed, that will be what `npm init` uses. If you want npm
+to use the latest version, or another specific version you must specify
+it:
+
+* `npm init foo@latest` # fetches and runs the latest `create-foo` from
+ the registry
+* `npm init foo@1.2.3` # runs `create-foo@1.2.3` specifically
+
#### Forwarding additional options
Any additional options will be passed directly to the command, so `npm init