question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to publish @scoped package

See original GitHub issue

Describe the bug I’m unable to publish package with scoped name. I’m receiving the following error on

npm publish --registry https://my-registry.url:

npm notice 
npm notice 📦  @MYSCOPE/MYPACKAGE@1.0.0
npm notice === Tarball Contents === 
npm notice 211B package.json 
npm notice 21B  index.js     
npm notice === Tarball Details === 
npm notice name:          @MYSCOPE/MYPACKAGE                         
npm notice version:       1.0.0                                   
npm notice package size:  424 B                                   
npm notice unpacked size: 484 B                                   
npm notice shasum:        d826d1a62d3d9620152aed73b6ba2a1a8030db47
npm notice integrity:     sha512-Y46OeJJoZvc2V[...]eH48pAHft41Yw==
npm notice total files:   2                                   
npm notice 
npm ERR! code E404
npm ERR! 404 Not Found - PUT https://my-registry.url/@MYSCOPE%2fMYPACKAGE
npm ERR! 404 
npm ERR! 404  '@MYSCOPE/MYPACKAGE@1.0.0' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because 
npm ERR! 404  1. name can only contain URL-friendly characters
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     ...-debug.log

Everything works fine with non-scoped package though.

To Reproduce My package’s package.json:

{
  "name": "@MYSCOPE/MYPACKAGE",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "author": "",
  "license": "ISC"
}

Configuration File (cat ~/.config/verdaccio/config.yaml)

storage: ./storage
plugins: ./plugins

web:
  title: Verdaccio

uplinks:
  npmjs:
    url: https://registry.npmjs.org/

packages:
  '@MYSCOPE/*':
    access: $all
    publish: $all
    unpublish: $all

  '**':
    access: $all
    publish: $all
    unpublish: $all
    proxy: npmjs

server:
  keepAliveTimeout: 60

middlewares:
  audit:
    enabled: true

logs:
  - { type: stdout, format: pretty, level: http }
  #- {type: file, path: verdaccio.log, level: info}

https:
    key: /etc/letsencrypt/live/.../privkey.pem
    cert: /etc/letsencrypt/live/.../cert.pem
    ca: /etc/letsencrypt/live/.../fullchain.pem

url_prefix: https://my-registry.url

Environment information

  System:
    OS: Linux 4.4 Ubuntu 16.04.6 LTS (Xenial Xerus)
    CPU: (1) x64 Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz
  Binaries:
    Node: 12.6.0 - ~/.nvm/versions/node/v12.6.0/bin/node
    npm: 6.9.0 - ~/.nvm/versions/node/v12.6.0/bin/npm
  npmGlobalPackages:
    verdaccio: 4.1.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
adambereczcommented, Jul 14, 2019

Yes, that exactly was the problem… Thank you @juanpicado!

1reaction
juanpicadocommented, Jul 12, 2019

I think you are missing AllowEncodedSlashes prop, check again the docs 😃

https://verdaccio.org/docs/en/reverse-proxy#apache

That is the unique difference I see by far

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to publish scoped NPM package on internal Artifactory
i am trying to publish a simple (there is only a js file inside) scoped NPM package on my company's Artifactory.
Read more >
Creating and publishing an organization scoped package
Publishing a public organization scoped package · On the command line, navigate to the package directory. · Run npm publish --access public ....
Read more >
How to publish a scoped NPM package for your organization
Wait just a few minutes and head to npmjs.com and you should be able to see your your package listed under your organization's,...
Read more >
How to troubleshoot NPM problems - JFrog
Using curl · NPM Login · NPM Install (Non-scoped) · NPM install (Scoped Packages) · NPM Publish · Dependency Rewrites.
Read more >
Unable to publish / login to npm package - GitLab.org
Set URL > for your scoped packages. For example package with name @my-org/my-package will use this URL for download. @cfeltz:registry= ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found