Skip to content

Commit d1ee8a5

Browse files
authored
docs: Add note on relative path prefix for npm publish (#9140)
Clarify requirements for relative paths in npm publish. This adds clarification on relative path support directly to the npm publish documentation. Currently, this documentation only alludes to package spec in the "see also" section, leaving it unclear that the unprefixed relative paths that are supported by most other tools will fail here. Enhancing this documentation is important since unprefixed relative paths result in surprising error messages that do not hint at the appropriate solution. ## References Related to #2796
1 parent 1afa738 commit d1ee8a5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

docs/lib/content/commands/npm-publish.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ A `package` is interpreted the same way as other commands (like `npm install`) a
5252
* f) a `<name>` that has a "latest" tag satisfying (e)
5353
* g) a `<git remote url>` that resolves to (a)
5454

55+
If either (a) or (b) is specified as a relative path, it should begin with an explicit `./` prefix.
56+
5557
The publish will fail if the package name and version combination already exists in the specified registry.
5658

5759
Once a package is published with a given name and version, that specific name and version combination can never be used again, even if it is removed with [`npm unpublish`](/commands/npm-unpublish).

0 commit comments

Comments
 (0)