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

[node] NotImplementedError: Don't know how to handle package in package-lock.json #391

Open
saccarosium opened this issue Feb 4, 2024 · 5 comments

Comments

@saccarosium
Copy link

saccarosium commented Feb 4, 2024

flatpak-builder version

1.4.0

Linux distribution and version

Debian Testing (13)

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

When trying to generate a generated-sources.json from a package.json gives the following error: NotImplementedError: Don't know how to handle package in package-lock.json.

  • Node version: v18.19.0
Full Error

Reading packages from lockfiles...
Traceback (most recent call last):
  File "/home/sacca/.local/bin/flatpak-node-generator", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/sacca/.local/share/pipx/venvs/flatpak-node-generator/lib/python3.11/site-packages/flatpak_node_generator/main.py", line 277, in main
    asyncio.run(_async_main())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/sacca/.local/share/pipx/venvs/flatpak-node-generator/lib/python3.11/site-packages/flatpak_node_generator/main.py", line 198, in _async_main
    packages.update(lockfile_provider.process_lockfile(lockfile))
  File "/home/sacca/.local/share/pipx/venvs/flatpak-node-generator/lib/python3.11/site-packages/flatpak_node_generator/providers/npm.py", line 166, in process_lockfile
    yield from self._process_packages_v2(lockfile, data)
  File "/home/sacca/.local/share/pipx/venvs/flatpak-node-generator/lib/python3.11/site-packages/flatpak_node_generator/providers/npm.py", line 138, in _process_packages_v2
    raise NotImplementedError(
NotImplementedError: Don't know how to handle package  in package-lock.json

@saccarosium saccarosium added the bug label Feb 4, 2024
@hfiguiere
Copy link
Collaborator

Affected flatpak-builder tool

cargo/flatpak-cargo-generator.py

Is this correct? Since the problem is with package-lock.json

@saccarosium
Copy link
Author

saccarosium commented Feb 4, 2024

Affected flatpak-builder tool

cargo/flatpak-cargo-generator.py

Is this correct? Since the problem is with package-lock.json

Nope I had problems with the picker. I've correct it.

@p3x-robot
Copy link

@p3x-robot
Copy link

it looks like with npm is not working, with yarn is working.

@p3x-robot
Copy link

now this different:

Cache miss, checking out last cache hit
========================================================================
Building module p3x-onenote in /home/patrikx3/Projects/patrikx3/p3x/onenote/.flatpak-builder/build/p3x-onenote-22
========================================================================
Running: yarn install --offline
yarn install v1.22.19
info No lockfile found.
[1/5] Validating package.json...
[2/5] Resolving packages...
error Couldn't find any versions for "@electron/remote" that matches "^2.1.2" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Error: module p3x-onenote: Child process exited with code 1

@hfiguiere hfiguiere added the node label Apr 5, 2024
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