[Problem Scenario]

The following error occurred when lerna was published in the company’s private library (built through CNPM) :

lerna info execute Skipping releases
lerna info git Pushing tags...
lerna info publish Publishing packages to npm...
lerna notice Skipping all user and access validation due to third-party registry
lerna notice Make sure you're authenticated properly ¯\_(ツ)_/¯
lerna http fetch PUT 400 http://npm.dxy.net:7001/@dxy%2frcpress-core 78ms
lerna ERR! E400 [maintainers_error] request body need maintainers
Copy the code

It is fine to publish directly to a private repository via NPM publish(configured). It is suspected that there is a problem with lerna’s release or related configuration of the private library, time is tight, we will see later.

The solution

This is attempted by adding maintainers fields in each package

  "maintainers": [
    "xxx1"."xxx2"].Copy the code

Once configured for each package, there is no problem with publishing through Lerna.