"Upload" doesn't work with `make staticpkg`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 641
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 57
Description
Bug Template
Describe the bug
One method to distribute MakeCode is to build it into a package with make staticpkg. This renders everything to static html and javascript. However, the "Upload" button doesn't work, and reports "Compilation failed, please check your code for errors." even when using the default program.
To Reproduce
Steps to reproduce the behavior:
- Clone
pxt-chibitronics-- for our purposes I'm using one with custom C++ code at https://github.com/xobs/pxt-chibitronics/tree/rainbow-tape - Run
make staticpkg - Serve the result with
cd built\packaged; python -m http.server - Go to
localhost:8000and attempt to upload a program
Expected behavior
The program should build and upload.
Screenshots

Desktop (please complete the following information):
- OS: Windows 10
- Browser Firefox
- Version 3.3.4
Additional context
The output from staticpkg attempts to make calls to many pages that don't exist. For example, it does a POST to http://localhost:8000/compile/extension, which results in a 501 error. It also attempts to access http://localhost:8000/clientconfig which doesn't exist.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running make staticpkg, serving built/packaged with python -m http.server, and reproducing the Upload failure. Trace the generated requests to /compile/extension and /clientconfig; done means the default program builds and uploads from the static package without requests to missing pages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100