Skip to content

Commit e83e5c9

Browse files
authored
docs: clarify npm init @latest behavior (#4435)
Closes: #3821
1 parent 9bdd1ac commit e83e5c9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/content/commands/npm-init.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ strictly additive, so it will keep any fields and values that were already
3838
set. You can also use `-y`/`--yes` to skip the questionnaire altogether. If
3939
you pass `--scope`, it will create a scoped package.
4040

41+
*Note:* if a user already has the `create-<initializer>` package
42+
globally installed, that will be what `npm init` uses. If you want npm
43+
to use the latest version, or another specific version you must specify
44+
it:
45+
46+
* `npm init foo@latest` # fetches and runs the latest `create-foo` from
47+
the registry
48+
* `npm init [email protected]` # runs `[email protected]` specifically
49+
4150
#### Forwarding additional options
4251

4352
Any additional options will be passed directly to the command, so `npm init

0 commit comments

Comments
 (0)