Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flatpak-node-generator: KeyError: 'name' #418

Open
faveoled opened this issue Aug 13, 2024 · 1 comment
Open

flatpak-node-generator: KeyError: 'name' #418

faveoled opened this issue Aug 13, 2024 · 1 comment

Comments

@faveoled
Copy link

flatpak-builder version

1.4.4

Linux distribution and version

Ubuntu 22.04

Affected flatpak-builder tool

node/flatpak-node-generator.py

flatpak-builder tool cli args

No response

Source repository URL

No response

Flatpak-builder manifest URL

No response

Description

$ flatpak-node-generator npm package-lock.json 
Reading packages from lockfiles...
Traceback (most recent call last):
  File "/home/user/.local/bin/flatpak-node-generator", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/share/pipx/venvs/flatpak-node-generator/lib/python3.10/site-packages/flatpak_node_generator/main.py", line 277, in main
    asyncio.run(_async_main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/home/user/.local/share/pipx/venvs/flatpak-node-generator/lib/python3.10/site-packages/flatpak_node_generator/main.py", line 198, in _async_main
    packages.update(lockfile_provider.process_lockfile(lockfile))
  File "/home/user/.local/share/pipx/venvs/flatpak-node-generator/lib/python3.10/site-packages/flatpak_node_generator/providers/npm.py", line 166, in process_lockfile
    yield from self._process_packages_v2(lockfile, data)
  File "/home/user/.local/share/pipx/venvs/flatpak-node-generator/lib/python3.10/site-packages/flatpak_node_generator/providers/npm.py", line 119, in _process_packages_v2
    name = json.load(fp)['name']
KeyError: 'name'

On this package-lock.json

@ReenigneArcher
Copy link
Contributor

ReenigneArcher commented Oct 4, 2024

Add "name": "<your-project-name>" to your package.json file, then recreate your package-lock.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants