Packages

verdaccio

7.1.2 · 18 Nov 2026MIT909.7k / weekRepositoryHomepagenpmAtom feed

Your version

5.11.0

2 Jun 2022Where it was published

5.33.0 is the newest release of 5.x.

npm marks 5.11.0 as deprecated: this version is deprecated, please migrate to 6.x versions

In short

2 deprecated3 new1 changed

  • Deprecated

    Using verdaccio with multiples listeners display a deprecation warning

  • Deprecated

    On verdaccio 6 will be removed and will throw an error

Release note

  • Run server init as promise

The way to use verdaccio programatically is not very friendly if you are using

const startVerdaccio = require('verdaccio'); 

as this example.

Deprecations

  • Deprecated

    Using verdaccio with multiples listeners display a deprecation warning

    • (runServer) forbid this and only allows the first one listener listed

  • Deprecated

    On verdaccio 6 will be removed and will throw an error

❌ Bad

listen:
 - localhost:4873            # default value
 - http://localhost:4873     # same thing

✅ Good (on v6.0.0 won't be a list anymore)

listen: localhost:4873

Feature

runServer method to run verdaccio programatically as a promise

I am looking for a better name, feel free to drop your ideas.

On v6 #2165 this was improved and I am moving the same API to v5 so is much easier to migrate in the future.

It's a bit experimental, it does not replace the old way, so won't break anything, but allows smooth migration

There are three ways to use it:

  • No input, it will find the config.yaml as is you would run verdaccio in the console

  • With a absolute path

  • With an object (there is a catch here, see below)

    const {runServer} = require('verdaccio');
    const app = await runServer(); // default configuration
    const app = await runServer('./config/config.yaml');
    const app = await runServer({ configuration });
    app.listen(4000, (event) => {
      // do something
    });

With an object you need to add self_path, manually (it's not nice but would be a breaking change changing it now) on v6 this is not longer need it.

      const configPath = join(__dirname, './config.yaml');
      const c = parseConfigFile(configPath);
      // workaround
      // on v5 the `self_path` still exists and will be removed in v6
      c.self_path = 'foo';
      runServer(c).then(() => {});

Read more here verdaccio.org/docs/verdaccio-programmatically

parseConfigFile method

Exposed for easy use parse a yaml file as an object

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.