component-detection icon indicating copy to clipboard operation
component-detection copied to clipboard

pnpm detection exception

Open aelij opened this issue 11 months ago • 0 comments

I'm seeing the following exception during component detection of a pnpm lock file:

##[error]Failed to read pnpm yaml file /__w/1/s/pnpm-lock.yaml
System.Collections.Generic.KeyNotFoundException: The given key '@x/y@link:../Y' was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Microsoft.ComponentDetection.Detectors.Pnpm.Pnpm9Detector.ProcessDependencyList(ISingleFileComponentRecorder singleFileComponentRecorder, Dictionary`2 components, Dictionary`2 dependencies, Boolean isDevelopmentDependency)
   at Microsoft.ComponentDetection.Detectors.Pnpm.Pnpm9Detector.ProcessDependencySets(ISingleFileComponentRecorder singleFileComponentRecorder, Dictionary`2 components, PnpmHasDependenciesV9 item)
   at Microsoft.ComponentDetection.Detectors.Pnpm.Pnpm9Detector.RecordDependencyGraphFromFile(String yamlFileContent, ISingleFileComponentRecorder singleFileComponentRecorder)
   at Microsoft.ComponentDetection.Detectors.Pnpm.PnpmComponentDetectorFactory.OnFileFoundAsync(ProcessRequest processRequest, IDictionary`2 detectorArgs, CancellationToken cancellationToken)

I can provide the lock file privately (Teams/email).

Note that detection seems to continue afterwards and does show packages in the summary.

aelij avatar Mar 18 '25 05:03 aelij