Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPM Extractor not calling "npm config fix" for npm >= 9 #764

Open
nwesoccer opened this issue Oct 30, 2023 · 1 comment
Open

NPM Extractor not calling "npm config fix" for npm >= 9 #764

nwesoccer opened this issue Oct 30, 2023 · 1 comment
Labels
bug Create a report to help us improve

Comments

@nwesoccer
Copy link

Describe the bug
When using the rtNpmInstall var from the jenkins-artifactory-plugin using NPM >= 9, we get the following error:

Invalid auth configuration found: _auth must be renamed to //{artifactory server}/artifactory/api/npm/:_auth in project config\nPlease run npm config fix to repair your configuration.`

According to JFrog documentation, the "npm config fix" command should be run after creating the .npmrc file. (https://jfrog.com/help/r/artifactory-changes-to-the-login-behavior-in-npm-v9/users-authenticating-with-the-npm-login-command)

There seems to be no hook for us to run this, and it seems like something the plugin should run. The best that we can tell, the plugin uses this repository to write that .npmrc file (https://github.com/jfrog/build-info/blob/master/build-info-extractor-npm/src/main/java/org/jfrog/build/extractor/npm/extractor/NpmBuildInfoExtractor.java#L192C25-L193C86).

Maybe this command should be run here: https://github.com/jfrog/build-info/blob/master/build-info-extractor-npm/src/main/java/org/jfrog/build/extractor/npm/extractor/NpmBuildInfoExtractor.java#L73.

To Reproduce
Create a jenkins pipeline with a rtNpmInstall step.

Expected behavior
The pipeline should properly run "npm i" without errorying about auth.

Screenshots
Screenshot 2023-10-30 at 16 50 00

Versions

  • Artifactory Version: 7.55.10
  • jenkins-artifactory-plugin Version: 3.18.1
  • build-info Version: 2.41.7

Additional context
Add any other context about the problem here.

@nwesoccer nwesoccer added the bug Create a report to help us improve label Oct 30, 2023
@Spaction
Copy link

Created #787 which should handle this. Reliant on maintainers to approve and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Create a report to help us improve
Projects
None yet
Development

No branches or pull requests

2 participants