The ERR_INVALID_AUTH error with NPM9

ARTIFACTORY: Using NPM client 9 with Jenkins Artifactory Plugins

AuthorFullName__c
Shisiya Sebastian
articleNumber
000005778
ft:sourceType
Salesforce
FirstPublishedDate
2023-06-11T10:53:15Z
lastModifiedDate
2023-06-11
VersionNumber
2
While trying to install an NPM package using the Jenkins Pipeline and Artifactory Jenkins plugin, an error is encountered. Here, the NPM version 9.5.0 and error is as given below.
npm ERR! code ERR_INVALID_AUTH
npm ERR! Invalid auth configuration found: `_auth` must be renamed to `//artifactory_host/artifactory/api/npm/:_auth` in project config
npm ERR! Please run `npm config fix` to repair your configuration.`

Though we try ‘npm config fix’ it won’t fix the error as the configuration is automatically generated by the Artifactory Plugin using JFrog CLI which cannot be changed.