NPM registry error: 400 (Bad request) "package_name" not given
Summary
GitLab Enterprise Edition 12.0.3-ee.
When uploading a package an error occurs "package_name" not given
Steps to reproduce
- Create a group for example foo.
- Create a subgroup for example bar.
- Create a npm project for example quux.
- Package.json has content:
{
"name": "@foo/quux",
"version": "0.0.1",
"private": false,
"dependencies": {
"react": "16.8.6"
},
"publishConfig": {
"@foo:registry": "https://gitlab.example.com/api/v4/projects/{project-id}/packages/npm/"
}
}
- .npmrc looks like this:
@seeder:registry=https://gitlab.example.com/api/v4/packages/npm/
//gitlab.example.com/api/v4/projects/:_authToken=TOKEN
//gitlab.example.com/api/v4/packages/npm/:_authToken=TOKEN
//gitlab.example.com/api/v4/projects/{project-id}/packages/npm/:_authToken=TOKEN
- run npm publish output
Registry returned 400 for PUT on https://gitlab.example.com/api/v4/projects/26/packages/npm/@foo%2fquux: 400 (Bad request) "package_name" not given
What is the current bug behaviour?
What happens is that it says that there is no package_name
.
What is the expected correct behaviour?
A successful upload is expected but it fails.
I've tried every permutation of the foo/bar/quux as the scope / package name. But nothing works.
Strangely I can get it to work if there is no subgroup bar
.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.21.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 12.0.3-ee Revision: 1b1872f9d93 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 9.6.11 URL: https://gitlab.example.com HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git SSH Clone URL: git@gitlab.example.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: crowd, google_oauth2
GitLab Shell Version: 9.3.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.3.0 ? ... OK (9.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Checking Reply by email ...
IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 5/3 ... yes 5/4 ... yes 12/9 ... yes 13/10 ... yes 21/14 ... yes 21/15 ... yes 12/23 ... yes 11/24 ... yes 12/26 ... yes 20/27 ... yes 11/28 ... yes 11/29 ... yes 11/30 ... yes 11/31 ... yes 11/32 ... yes 11/33 ... yes 11/34 ... yes 118/36 ... yes 118/38 ... yes 123/39 ... yes 123/40 ... yes 11/41 ... yes 125/42 ... yes 125/43 ... yes 125/44 ... yes 12/45 ... yes 126/46 ... yes 126/47 ... yes 126/48 ... yes 126/49 ... yes 126/50 ... yes 126/51 ... yes 127/52 ... yes 127/53 ... yes 127/54 ... yes 127/55 ... yes 127/56 ... yes 26/57 ... yes 120/58 ... yes 135/59 ... yes 135/60 ... yes 135/61 ... yes 120/62 ... yes 120/63 ... yes 119/64 ... yes 120/65 ... yes 120/66 ... yes 129/68 ... yes 129/69 ... yes 129/70 ... yes 117/71 ... yes 131/72 ... yes 131/73 ... yes 132/74 ... yes 132/75 ... yes 133/76 ... yes 133/77 ... yes 133/78 ... yes 133/79 ... yes 133/80 ... yes 133/81 ... yes 133/82 ... yes 133/83 ... yes 133/84 ... yes 133/85 ... yes 133/86 ... yes 133/87 ... yes 137/88 ... yes 137/89 ... yes 137/90 ... yes 137/91 ... yes 121/92 ... yes 121/93 ... yes 121/94 ... yes 121/95 ... yes 121/96 ... yes 5/97 ... yes 136/98 ... yes 136/99 ... yes 136/100 ... yes 136/101 ... yes 138/102 ... yes 138/103 ... yes 138/104 ... yes 136/105 ... yes 136/106 ... yes 141/107 ... yes 141/108 ... yes 140/109 ... yes 140/110 ... yes 121/111 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.21.0 ? ... yes (2.21.0) Git user has default SSH configuration? ... yes Active users: ... 15 Elasticsearch version 5.6 - 6.x? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished