openSUSE / obs-service-node_modules

MIT License
7 stars 11 forks source link

Error if resolved dependency lacks Integrity #16

Closed AdamMajer closed 3 years ago

AdamMajer commented 3 years ago
Traceback (most recent call last):
  File "/usr/lib/obs/service/node_modules", line 591, in <module>
    sys.exit(main(args))
  File "/usr/lib/obs/service/node_modules", line 343, in main
    process_packagelock_file(js)
  File "/usr/lib/obs/service/node_modules", line 309, in process_packagelock_file
    collect_deps_recursive("", js["dependencies"])
  File "/usr/lib/obs/service/node_modules", line 294, in collect_deps_recursive
    collect_deps_recursive(path, entry["dependencies"])
  File "/usr/lib/obs/service/node_modules", line 290, in collect_deps_recursive
    integrity = entry["integrity"]
KeyError: 'integrity'
Aborting: service call failed:  /usr/lib/obs/service/node_modules --cpio node_modules.obscpio --output node_modules.spec.inc --source-offset 10000 --outdir /tmp/home:DocB:branches:devel:languages:python/tryton-sao/tmpxfxuqph6.node_modules.service

This is caused by resolved entries lacking integrity entries,


"dependencies": {
        "align-text": {
          "version": "0.1.4",
          "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
          "bundled": true,
          "dev": true,
          "optional": true,
          "requires": {
            "kind-of": "^3.0.2",
            "longest": "^1.0.1",
            "repeat-string": "^1.5.2"
          }
        },