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-generator: assert (package.lockfile.parent / source.path / 'package.json').is_file() AssertionError #373

Open
bbhtt opened this issue Sep 15, 2023 · 3 comments

Comments

@bbhtt
Copy link
Contributor

bbhtt commented Sep 15, 2023

flatpak-builder version

flatpak-builder-1.3.3

Linux distribution and version

Fedra 39

Affected flatpak-builder tool

node/flatpak-node-generator.py

flatpak-builder tool cli args

No response

Source repository URL

https://github.com/ghk/sideka-electron.git

Flatpak-builder manifest URL

https://github.com/flathub/id.sideka.App/blob/master/id.sideka.App.json

Description

flatpak-node-generator yarn yarn.lock
Reading packages from lockfiles...
1398 packages read.
Generating packages [116/1398] find-up @ 2.1.0                                                                                                                     
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/wirt/Git/github/flatpak-builder-tools/node/flatpak_node_generator/main.py", line 277, in main
    asyncio.run(_async_main())
  File "/usr/lib64/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/asyncio/base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/home/wirt/Git/github/flatpak-builder-tools/node/flatpak_node_generator/main.py", line 229, in _async_main
    await progress.run()
  File "/home/wirt/Git/github/flatpak-builder-tools/node/flatpak_node_generator/progress.py", line 78, in run
    await coro
  File "/usr/lib64/python3.12/asyncio/tasks.py", line 621, in _wait_for_one
    return f.result()  # May raise f.exception().
           ^^^^^^^^^^
  File "/home/wirt/Git/github/flatpak-builder-tools/node/flatpak_node_generator/progress.py", line 68, in _generate
    await self.module_provider.generate_package(package)
  File "/home/wirt/Git/github/flatpak-builder-tools/node/flatpak_node_generator/providers/yarn.py", line 164, in generate_package
    assert (package.lockfile.parent / source.path / 'package.json').is_file()
AssertionError
@bbhtt bbhtt added the bug label Sep 15, 2023
@bbhtt
Copy link
Contributor Author

bbhtt commented Sep 15, 2023

Can't use npm generator because of #372

@refi64
Copy link
Collaborator

refi64 commented Sep 15, 2023

This sounds like there's a file: or link: source in your package.json / yarn.lock that's missing a package.json inside it.

@hfiguiere hfiguiere added the node label Apr 5, 2024
@bestlinuxgamers
Copy link

bestlinuxgamers commented Apr 27, 2024

I had this error for https://github.com/janhq/jan
The project consists of several sub-modules in sub-folders, which depend on each other. For this, link:./sub-module is used, although the folder of the submodule should be ../sub-module relative to its dependent module. This (incorrect) path declaration is apparently supported by Yarn.

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

4 participants