Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9de5cb5d
Commit
9de5cb5d
authored
Mar 22, 2021
by
Kate Grechishkina
Committed by
Nick Gaskill
Mar 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update npm registy doc with a few changes
parent
73f6ae7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
doc/user/packages/npm_registry/index.md
doc/user/packages/npm_registry/index.md
+15
-0
No files found.
doc/user/packages/npm_registry/index.md
View file @
9de5cb5d
...
@@ -263,6 +263,16 @@ npm publish
...
@@ -263,6 +263,16 @@ npm publish
To view the package, go to your project's
**Packages & Registries**
.
To view the package, go to your project's
**Packages & Registries**
.
You can also define
`"publishConfig"`
for your project in
`package.json`
. For example:
```
json
{
"publishConfig"
:
{
"@foo:registry"
:
" https://gitlab.example.com/api/v4/projects/<your_project_id>/packages/npm/"
}
}
```
This forces the package to publish only to the specified registry.
If you try to publish a package
[
with a name that already exists
](
#publishing-packages-with-the-same-name-or-version
)
within
If you try to publish a package
[
with a name that already exists
](
#publishing-packages-with-the-same-name-or-version
)
within
a given scope, you get a
`403 Forbidden!`
error.
a given scope, you get a
`403 Forbidden!`
error.
...
@@ -402,6 +412,9 @@ Due to a bug in npm 6.9.0, deleting distribution tags fails. Make sure your npm
...
@@ -402,6 +412,9 @@ Due to a bug in npm 6.9.0, deleting distribution tags fails. Make sure your npm
## Troubleshooting
## Troubleshooting
When troubleshooting npm issues, first run the same command with the
`--verbose`
flag to confirm
what registry you are hitting.
### Error running Yarn with the Package Registry for npm registry
### Error running Yarn with the Package Registry for npm registry
If you are using
[
Yarn
](
https://classic.yarnpkg.com/en/
)
with the npm registry, you may get
If you are using
[
Yarn
](
https://classic.yarnpkg.com/en/
)
with the npm registry, you may get
...
@@ -471,6 +484,8 @@ If you get this error, ensure that:
...
@@ -471,6 +484,8 @@ If you get this error, ensure that:
-
Your token is not expired and has appropriate permissions.
-
Your token is not expired and has appropriate permissions.
-
[
Your token does not begin with `-`
](
https://gitlab.com/gitlab-org/gitlab/-/issues/235473
)
.
-
[
Your token does not begin with `-`
](
https://gitlab.com/gitlab-org/gitlab/-/issues/235473
)
.
-
A package with the same name or version doesn't already exist within the given scope.
-
A package with the same name or version doesn't already exist within the given scope.
-
Your NPM package name does not contain a dot
`.`
. This is a
[
known issue
](
https://gitlab.com/gitlab-org/gitlab-ee/issues/10248
)
in GitLab 11.9 and earlier.
-
The scoped packages URL includes a trailing slash:
-
The scoped packages URL includes a trailing slash:
-
Correct:
`//gitlab.example.com/api/v4/packages/npm/`
-
Correct:
`//gitlab.example.com/api/v4/packages/npm/`
-
Incorrect:
`//gitlab.example.com/api/v4/packages/npm`
-
Incorrect:
`//gitlab.example.com/api/v4/packages/npm`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment