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
e7ef15d3
Commit
e7ef15d3
authored
Jan 21, 2021
by
Suzanne Selhorn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added info about installing from group
Related to:
https://gitlab.com/gitlab-org/gitlab/-/issues/289939
parent
7022bdef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
doc/user/packages/npm_registry/index.md
doc/user/packages/npm_registry/index.md
+12
-6
No files found.
doc/user/packages/npm_registry/index.md
View file @
e7ef15d3
...
...
@@ -244,7 +244,9 @@ Prerequisites:
-
[
Authenticate
](
#authenticate-to-the-package-registry
)
to the Package Registry.
-
Set a
[
project-level NPM endpoint
](
#use-the-gitlab-endpoint-for-npm-packages
)
.
-
Your NPM package name must be in the format of
[
@scope/package-name
](
#package-naming-convention
)
. It must match exactly, including the case.
-
Your NPM package name must be in the format of
[
@scope/package-name
](
#package-naming-convention
)
.
It must match exactly, including the case. This is different than the
NPM naming convention, but it is required to work with the GitLab Package Registry.
To upload an NPM package to your project, run this command:
...
...
@@ -263,6 +265,9 @@ Prerequisites:
-
[
Authenticate
](
#authenticate-to-the-package-registry
)
to the Package Registry.
-
Set a
[
project-level NPM endpoint
](
#use-the-gitlab-endpoint-for-npm-packages
)
.
-
Your NPM package name must be in the format of
[
@scope/package-name
](
#package-naming-convention
)
.
It must match exactly, including the case. This is different than the
NPM naming convention, but it is required to work with the GitLab Package Registry.
To work with NPM commands within
[
GitLab CI/CD
](
../../../ci/README.md
)
, you can use
`CI_JOB_TOKEN`
in place of the personal access token or deploy token in your commands.
...
...
@@ -297,7 +302,8 @@ the same version more than once, even if it has been deleted.
## Install a package
NPM packages are commonly-installed by using the
`npm`
or
`yarn`
commands
in a JavaScript project.
in a JavaScript project. You can install a package from the scope of a project, group,
or instance.
1.
Set the URL for scoped packages by running:
...
...
@@ -309,16 +315,16 @@ in a JavaScript project.
1.
Ensure
[
authentication
](
#authenticate-to-the-package-registry
)
is configured.
1.
In your project, to install a package
, run:
1.
To install a package in your project
, run:
```
shell
npm
install
@my-
project-
scope/my-package
npm
install
@my-scope/my-package
```
Or if you're using Yarn:
```
shell
yarn add @my-
project-
scope/my-package
yarn add @my-scope/my-package
```
In
[
GitLab 12.9 and later
](
https://gitlab.com/gitlab-org/gitlab/-/issues/55344
)
,
...
...
@@ -456,7 +462,7 @@ If you get this error, ensure that:
-
Your token is not expired and has appropriate permissions.
-
[
Your token does not begin with `-`
](
https://gitlab.com/gitlab-org/gitlab/-/issues/235473
)
.
-
A package with the same name doesn't already exist within the given scope.
-
A package with the same name
or version
doesn't already exist within the given scope.
-
The scoped packages URL includes a trailing slash:
-
Correct:
`//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