Problem with dev-mode and flap-display package


I’m trying to add a new texture / charset to the flap-display package. Unsuprisingly the first version I made does not work. I’m trying to debug it locally with dev-mode. I thought I’d start with the unmodified flap-display but to my surprise it refuses to start when uploaded locally.

This is the error message from the log:

user.notice info-beamer: [root] runtime error: root/node.lua:202: attempt to index upvalue 'display' (a nil value)
user.notice info-beamer: stack traceback:
user.notice info-beamer: 	root/node.lua:202: in function <root/node.lua:201>
user.notice info-beamer: 	bundled userlib.lua:761: in function <bundled userlib.lua:757>
user.notice info-beamer: 	kernel: in function 'run_in_sandbox'

Can someone point me in some direction, please.

The package works fine when configured via the web page.
The “example” package from the dev-mode loads fine locally.

The error is cause here:

Reason is that display is never initialized if config.json doesn’t exist (as this callback isn’t called). This file isn’t part of the package’s source code as it’s generated by info-beamer hosted. If you want to use dev-mode, you’ll have to create your own config.json file. Either based on the “schema information” in node.json or by using hosted for configuration and then using its generated config file.

Thank you. I think I understand now.

About the config.json file: will the dev-mode script upload it locally with all the other files if I just add it locally to my package?

Correct. You can also add it to your repository as hosted will ignore it and use its own generated file if you deploy the package through hosted.

1 Like