I submitted my Midnight project in the final hours — it wasn’t easy, but I shipped an MVP. My dream has always been to join the MLH Fellowship. After receiving an invitation from MLH, I dove into the Midnight docs and tutorials, learned Compact, and finally submitted Silent Loan Circle: a privacy-preserving ROSCA where users contribute to a circle and withdraw funds via the Midnight blockchain.
Live demo: https://silent-circle-loan.vercel.app — try it, please.
What I shipped
-
A working MVP with a live URL and wallet connect (Lace wallet).
-
Web UI (Next.js + Tailwind) and a CLI for developer flows.
-
Compact smart contract on Midnight (prototype).
This is a big achievement I’ll add to my resume.
The challenges I ran into
Deploying to Midnight was the hardest part within the limited time. I ran into dependency and runtime errors while compiling and deploying. Below are the core issues I saw and a short excerpt from the logs:
Key error symptoms
-
ERR_MODULE_NOT_FOUNDfor a midnight wasm snippet path (module import failure inside node_modules). -
compactccompile process failed with exit code 255. -
nodecrashed during thetestnet-remotescript with a V8 fatal error (Check failed: module->status()), causing the deployment step to fail. -
The UI sometimes shows blank when running
npm run dev.
Example log excerpt (shortened):
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../node_modules/@midnight-ntwrk/zswap/snippets/.../inline0.js'
...
Generation failed: Error: Command failed with exit code 255: compactc ... my-contract.compact ...
...
Node.js v23.11.1
# Fatal error ... Check failed: module->status() == kEvaluating || module->status() == kEvaluatingAsync.
Feedback for Midnight (what I discovered)
While building, I found several issues and edge-cases that I’m submitting for Midnight’s consideration:
-
Missing or broken ESM/wasm snippet imports in some
@midnight-ntwrkpackages (causesERR_MODULE_NOT_FOUND). -
compactccompilation errors that fail silently or return non-helpful error messages — debugging is difficult. -
Runtime crashes when running CLI deployment scripts with newer Node versions (V8 fatal errors).
-
Blank UI on
npm run devin some boilerplates — likely dependency or build config mismatch.
Troubleshooting checklist I used (and recommend)
If you run into similar problems, try these steps in order:
-
Node LTS: Use an LTS Node.js version (e.g., 18.x or 20.x LTS) instead of bleeding-edge (I was on v23). Many Midnight packages expect stable Node semantics.
-
Clean install:
rm -rf node_modules package-lock.json npm cache verify npm i -
Check WASM/snippet files: If
ERR_MODULE_NOT_FOUNDreferences a file insidenode_modules/@midnight-ntwrk/*, try reinstalling that package or check for known issues in the repo. -
Set environment variables: Ensure
.envhasWALLET_SEED(or equivalent). The deploy scripts often require a seeded wallet. -
Run compact compiler directly: Try
compactcon your.compactfile locally and capture stderr — sometimes the error details are more explicit. -
Use verbose Node: Run the failing script with
node --trace-warnings --trace-deprecationto surface more info. -
Lock package versions: If scaffold uses
latestdeps, pin versions recommended in Midnight examples to avoid breaking changes. -
Ask the community: share the exact error and Node version in Midnight’s Discord/GitHub — maintainers often flag known issues quickly.
If you want, I can prepare a short PR with:
-
pinned dependency versions,
-
a recommended Node version in
enginesinpackage.json, -
and a small
READMEtroubleshooting section — that tends to fix most “blank UI / compile” pain quickly.
Next bus stop
I’ve been invited to London to hack in person — I’m already preparing. My next hack will be much better because I’ve started learning Midnight deeply. I can’t wait to meet other builders at the Midnight Hackathon Summit in London. Thanks for the opportunity and the experience.