verdaccio: 404 no such package available error

command:

$ npm publish --registry=http://mydomain.com:5000 --scope=@myscope
npm ERR! publish Failed PUT 404
npm ERR! code E404
npm ERR! 404 no such package available : @myscope/mypackage
npm ERR! 404
npm ERR! 404  '@myscope/mypackage' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

config.yaml:

packages:
  '@myscope/*':
    #scoped packages
    access: $all
    publish: $authenticated

  '@*/*':
    # scoped packages
    access: $all
    publish: $authenticated
    proxy: npmjs

  '**':
    # allow all users (including non-authenticated users) to read and
    # publish all packages
    #
    # you can specify usernames/groupnames (depending on your auth plugin)
    # and three keywords: "$all", "$anonymous", "$authenticated"
    access: $all

    # allow all known users to publish packages
    # (anyone can register by default, remember?)
    publish: $authenticated

    # if package is not available locally, proxy requests to 'npmjs' registry
    proxy: npmjs

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 22 (8 by maintainers)

Most upvoted comments

If your using docker then the following worked for me:

docker-compose exec --user root {CONTAINER_NAME} /bin/sh

and then

cd /verdaccio

chown verdaccio: . -R

or chown verdaccio: /verdaccio/ -R for short

We had the same error in my company and was full storage disk space.

@juanpicado I can confirm setting the permissions to verdaccio:verdaccio solved my issue. I had to to run the following commands on the ECS cluster instance to be able to chown with the correct uid/guid:

$ sudo groupadd verdaccio -g 101
$ sudo useradd -u 100 -g 101 verdaccio -s /bin/false -M
$ sudo chown -R verdaccio:verdaccio /mnt/efs/verdaccio/

Now the volume verdaccio container is using has the correct permissions and I can publish with scope.

@tvb version 3 has suffered a lot of refactorizations, I was expecting weird stuff. Thanks for reporting.