typst icon indicating copy to clipboard operation
typst copied to clipboard

error: input file not found (searched at file.typ)

Open m-kru opened this issue 1 year ago • 1 comments

Description

typst 0.11.0 (2bf9f95d)

Installed via snap.

I have a super simple typst file:

- One
  - Two
    - Three

When I try to compile using typst compile file.typ I get the following error:

error: input file not found (searched at file.typ)

which is a little bit unclear to me, as the file exists in the folder where I call typst.

Reproduction URL

No response

Operating system

Linux

Typst version

  • [ ] I am using the latest version of Typst

m-kru avatar Apr 09 '24 18:04 m-kru

Hey, I wasn't able to reproduce this issue. Can you run ls before typst compile file.typ? That should include a file named file.typ.

noamzaks avatar Apr 12 '24 18:04 noamzaks

I still do not know what is causing the issue. However, I have found out the problem exists only when the .typ file is placed in a path inside the /tmp directory, for example /tmp/foo.typ o /tmp/bar/foo.typ. I can compile when the .typ file is located in any other directory.

m-kru avatar May 07 '24 07:05 m-kru

This is expected. The Snap is running in full confinement (as opposed to Snaps you need to install with --classic). This means that by default, it can only read your home directory. You can add the capability to read from removable media in dev by running snap connect typst:removable-media. You cannot, however, add the capability to read any other directories, see https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1643706. Publishing new Snaps in classic confinement that have this ability is strongly discouraged by the Snapcraft docs (see https://snapcraft.io/docs/classic-confinement).

reknih avatar May 07 '24 09:05 reknih