flatpak / flatpak-builder-tools

Various helper tools for flatpak-builder
198 stars 108 forks source link

[node] KeyError: 'from' in flatpak-node-generator.py", line 461, in process_dependencies #79

Closed muelli closed 5 years ago

muelli commented 5 years ago

I am trying to run the the node generator on this lockfile, but it fails:

$ flatpak-node-generator.py --recursive npm package-lock.json 
WARNING: aiohttp is not found, performance will suffer.
  (Pass --no-aiohttp to silence this warning.)
Found 6 lockfiles.
Reading packages from lockfiles...
Traceback (most recent call last):
  File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 939, in <module>
    asyncio.get_event_loop().run_until_complete(main())
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 908, in main
    packages.update(lockfile_provider.process_lockfile(lockfile))
  File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 476, in process_lockfile
    yield from self.process_dependencies(lockfile, data['dependencies'])
  File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 468, in process_dependencies
    yield from self.process_dependencies(lockfile, info['dependencies'])
  File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 461, in process_dependencies
    git_source = self.parse_git_source(version, info['from'])
KeyError: 'from'
$

I am generously CCing @refi64 as the only author of that file.

I've found out that it is complaining about the abbrev package. It looks a bit like https://github.com/RocketChat/Rocket.Chat/issues/15408 is describing a very similar problem. I've monkey patched my way around, but now detect-libc is entirely missing from the package-lock.json. Weird.

refi64 commented 5 years ago

Will take a look at it this weekend!

On Wed, Nov 6, 2019, 5:07 PM muelli notifications@github.com wrote:

I am trying to run the the node generator on this lockfile https://github.com/deltachat/deltachat-desktop/blob/59d2a55a49c48929fbe86fce1ef50e27c12af4ed/package-lock.json#L1, but it fails:

$ flatpak-node-generator.py --recursive npm package-lock.json WARNING: aiohttp is not found, performance will suffer. (Pass --no-aiohttp to silence this warning.) Found 6 lockfiles. Reading packages from lockfiles... Traceback (most recent call last): File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 939, in asyncio.get_event_loop().run_until_complete(main()) File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete return future.result() File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 908, in main packages.update(lockfile_provider.process_lockfile(lockfile)) File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 476, in process_lockfile yield from self.process_dependencies(lockfile, data['dependencies']) File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 468, in process_dependencies yield from self.process_dependencies(lockfile, info['dependencies']) File "/home/muelli/vcs/flatpak-builder-tools/node/flatpak-node-generator.py", line 461, in process_dependencies git_source = self.parse_git_source(version, info['from']) KeyError: 'from' $

I am generously CCing @refi64 https://github.com/refi64 as the only author of that file.

I've found out that it complaining about the abbrev package. It looks a bit like RocketChat/Rocket.Chat#15408 https://github.com/RocketChat/Rocket.Chat/issues/15408 is describing a very similar problem. I've monkey patched my way around, but now detect-libc is entirely missing from the package-lock.json. Weird.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/flatpak/flatpak-builder-tools/issues/79?email_source=notifications&email_token=AAM4YSJE5V3FTUSXRMELN2LQSNE3ZA5CNFSM4JJ7AW6KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HXOI5RA, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM4YSKH2HDO522IS3ZH2ALQSNE3ZANCNFSM4JJ7AW6A .