Why does an attempt to use touying locally leads to strange errors?

Hi,
Example is here:
https://typst.app/project/rgLXxsDglfaJZhRt8FtYKw

At my company we can not use the internet in internal computers, thus I wanted to copy all the modules of touying package to generate slides.
The problem is that even a I copied all the .typ files and imported all the functions of the package, it still crashes at a point:

self.subslide = 1

Any idea how to do this?

Hey @Granat_Marcell, welcome to the forum! I’ve moved your post to Questions as the general category is for general discussions only, not for support. In addition, I’ve changed your question post’s title to better fit our guidelines: How to post in the Questions category

Make sure your title is a question you’d ask to a friend about Typst. :wink:

I didn’t look at the example project, but I just want to note that there is also a local storage of packages which the Typst CLI or Tinymist can use (if you use one of those).

On Linux the folder is ~/.local/share/typst/packages/local/. If you have used the touying package before you should be able to find it in one of those folders:

  • ~/.local/share/typst/packages/preview/
  • ~/.cache/typst/packages/preview/

Just copy it to the folder mentioned above, and use the local instead of preview namespace for import.

(For the folders on Windows and Mac… either try out, or maybe it’s written somewhere in some README.md, or look at the source code of typst-cli.)