Skip to content

pnpm detection exception #1373

Open
Open
@aelij

Description

@aelij

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions