As part of my CI/CD system, I use a private NPM registry with .npmrc and _auth as described in [1] to connect and it has worked just fine when using NPM 7 and 8, however, when execute pipelines to build NodeJS apps using NPM 9, I’ve got the following error that _auth setting must be scoped
npm ERR! code ERR_INVALID_AUTH
npm ERR! Invalid auth configuration found: _auth
must be renamed to //artifacts.mycompany.com/repository/npm/:_auth
in project config
npm ERR! Please run npm config fix
to repair your configuration.`
After implementing the .npmrc changes suggested for the _auth setting, builds are working fine for Node apps using NPM 9, however, we are getting the following error when use the same .npmrc settings (updated for NPM 9) in NPM 8 apps when trying to run npm publish command:
npm notice
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://artifacts.mycompany.com/repository/npm/
npm ERR! need auth You need to authorize this machine using npm adduser
Is this a use case supported by Sonatype Nexus ? Any thoughts ?