Skip to content

Typst Snap package can't access local packages #2

Open

Description

@Unaimend

Description

I tried installing the package [2] on my system via cloning the repo into the following path
~/.local/share/typst/packages/local/petri/0.1.0 by following the approach described in [3]
The typst compiler nonetheless gives the following error

error: package not found (searched for @local/petri:0.1.0)
  ┌─ ProjectPlan.typ:5:8
  │
5 │ #import "@local/petri:0.1.0": *
  │         ^^^^^^^^^^^^^^^^^^^^

System information can be found in the following screenshot
image

Some more things were tried below the following question on the discord but nothing worked
https://discord.com/channels/1054443721975922748/1088371919725793360/1274364908187942924

Thank you very much for typst and your help

[2] https://github.com/augustebaum/petri
[3] https://github.com/typst/packages

Activity

  1. changed the title [-]Cant import local package [/-] [+]Can't import local package [/+] on Aug 17, 2024
  2. PgBiel commented on Aug 17, 2024

    @PgBiel

    As commented on Discord, this seems to be a problem with Typst's snap package, which currently seems to excessively restrict the directories Typst can access.

  3. changed the title [-]Can't import local package [/-] [+]Typst Snap package can't access local packages[/+] on Aug 17, 2024
  4. transferred this issue fromtypst/packageson Aug 17, 2024
  5. SalahEddineGhamri commented on Jun 8, 2025

    @SalahEddineGhamri

    Any update on this, I am facing this issue and it is annoying.

  6. reknih commented on Jun 9, 2025

    @reknih
    Member

    PR #1 does unfortunately not work to resolve this. I have tried working on it but had no success. My post about it on the Snapcraft forum did not get any replies. Hence, until someone with more experience in this area chimes in, we are stuck with this behavior.

    You will need to install Typst from another source (e.g. cargo binstall or the prebuilt binaries) to work around this issue.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions