Importing certain extensions like keyboard, mouse, gamepad, etc. it causes compilation error in staticpkg hosted on github pages
steps to reproduce:
follow all the steps in Local Dev Server in pxt-maker github page.
use command pxt staticpkg to generate static page
host the static package on github pages like here: https://suraj022.github.io/pxt-test/ (screenshots below are from localhost but it behaves the same on github page aswell)
open the page stated above and create a new project then select a board eq. adafruit feather-m0-express.
Go to advanced > extensions and select either keyboard, mouse or gamepad
Go to javascript/python editor, click on explorer then select output on the bottom and click on output.txt
The editor tries to call our cloud backend api that does the native compilation. Since you are not hosted on our server, it is unavailable to you. You will need to implement this api and host on your backend.
No docs. The client sends a complete payload of the sources and expects the compiled binary to be placed in the blob container at the SHA location. Why not using maker.makecode.com? Cloud compilation for static packages is not supported.
ah ok… I’m not using maker.makecode.com because I Have a bunch of boards with a very specific audience. And I wish to implement as a seperate instance. Is there anyway to reroute the cloud backend api to directly access your server? or host the package anyway other than using staticpkg
also, is the sourcecode of cloud backend api available?
@suraj022 please file a bug in github.com/microsoft/pxt to document the build api. We do not have plans to open source the backend as it is specific to our cloud infrastructure, but we can documentation the protocol.