flatpak / flatpak-builder-tools

Various helper tools for flatpak-builder
195 stars 107 forks source link

node-generator: assert (package.lockfile.parent / source.path / 'package.json').is_file() AssertionError #373

Open bbhtt opened 1 year ago

bbhtt commented 1 year ago

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 commented 1 year ago

Can't use npm generator because of https://github.com/flatpak/flatpak-builder-tools/issues/372

refi64 commented 1 year ago

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

bestlinuxgamers commented 5 months ago

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.