Open VigneshC-Jfrog opened 2 years ago
we currently run into issues with 'jfrog npm ci' as well because "npm ls --json --all --long" yields errors and seems to be running. For - yet unknown reasons - "npm ls" seems to be triggered only when build-name/number/url are set.
@pniederlag
The npm ls
command runs when the JFrog CLI is asked to collect and publish build-info for npm. It uses the output to build the dependency list for the build-info.
To prevent running this command, remove the --build-name
and the --build-number
flags.
Please let me know if that helped.
@pniederlag The
npm ls
command runs when the JFrog CLI is asked to collect and publish build-info for npm. It uses the output to build the dependency list for the build-info. To prevent running this command, remove the--build-name
and the--build-number
flags.Please let me know if that helped.
It helps but seems quite unintuitive. We have JFROG_CLI_BUILD_NAME and JFROG_CLI_BUILD_NUMBER as environment-variables during CI-Run und now must find a way to disable this behaviour. Would be way cleaner if there was an explicit switch or toggle for activating/deactivating integration of build-dependencies.
@yahavi pls also note that there is a somwhat anoying bug in upstream npm wit "npm ls --all --long" on any npm version I have checked, see this report for details and a simple testcase to trigger it: https://github.com/npm/cli/issues/5961
Is your feature request related to a problem? Please describe.
While triggering the NPM install command via JFrog CLI in Jenkins, it internally calls the "npm ls" command which would show warning messages related to discrepancies within the dependencies defined in the package.json ( if any ). Attaching the sample snippet and warning messages for reference:
Describe the solution you'd like to see
Customers would like to disable the 'npm ls' command to be triggered in the background by default as these warning messages might cause confusion to the users who are managing the pipeline jobs
Describe alternatives you've considered
We can set the log level to error by setting the following environment variable ( link ).
JFROG_CLI_LOG_LEVEL=ERROR