Unable to publish NPM package for scoped packages

I am trying to publish a scoped package in nexus repository. Everytime i am trying to publish it is failing by giving status 401

lerna ERR! E401 Unable to authenticate, need: BASIC realm="Sonatype Nexus Repository Manager"

this i am experiencing with both normal repo and mono repo

When i am publishing scoped packages it’s automatically picking npm-group even that is not configured in .npmrc , lerna.json, package.json

This seems more of an environmental issue than one with Nexus. We do have some simple documentation for configuring npm.

I believe you can have .npmrc both in the project and in your home directory. Aside from that you may need to consult with the official NPM documentation to determine where the registry may be configured for the client.