y-lohse / inkjs

A javascript port of inkle's ink scripting language.
http://www.inklestudios.com/ink/
MIT License
506 stars 103 forks source link

Serverless template Uncaught Error: Failed to convert token to runtime object: "#", but working with ink-full.js #1017

Closed JeFawk closed 1 year ago

JeFawk commented 1 year ago

Describe the bug

Using the browser_serverless template, I added a json file exported from ink with tags (you use # in ink to make them) but ran into this error: Failed to convert token to runtime object: "#"

Once I used this js file, it got fixed: https://unpkg.com/inkjs@2.2.1/dist/ink-full.js

To Reproduce

Expected behavior

Ink files

Environment

Additional context

smwhr commented 1 year ago

Oh, i may have forgotten to update the templates with the latest version. We should automate that.

You should not have to use inkjs-full if you're not doing any compilatiom. To read a json exported from inky the base inkjs is enough (and smaller)

JeFawk commented 1 year ago

Oh, i may have forgotten to update the templates with the latest version. We should automate that.

You should not have to use inkjs-full if you're not doing any compilatiom. To read a json exported from inky the base inkjs is enough (and smaller)

Can you please point out where the base inkjs would be located? I haven't managed to find it (inkjs in js, not ts)

Thank you

smwhr commented 1 year ago

It's available to download in the release section, or you can use npm or yarn.

It's also available on all major CDNs like jsDeliver or unpkg

smwhr commented 1 year ago

(The files in the templates folder have been updated)