Skip to content

The kitchen modules are packaged - #844

Merged
sridharkalaibala merged 1 commit into
developfrom
fix/the-kitchen-modules-are-packaged
Sep 16, 2026
Merged

sridharkalaibala merged 1 commit into
developfrom
fix/the-kitchen-modules-are-packaged

Conversation

@sridharkalaibala

Copy link
Copy Markdown
Contributor

Caught while building an installer for a live restaurant. The build was already staged and about to be installed.

src/main.js, src/kot-manager.js and src/order-alert.js all require src/kitchen-announce.js, and order-alert also requires src/kitchen-call.js. Neither is in build.files, so neither is in the installer. I confirmed against the packaged output: both absent, not beside server.js and not in the asar.

main.js requires one of them. That is not a quiet degradation on a customer machine, it is "Cannot find module" at startup.

This is the second one today, and the same failure that took a shop's handsets down this morning (#830): a module written, correct, tested, and packaged where nothing could reach it.

The guard was not missing

scripts/check-packaged-modules.js catches this exactly, runs in npm run check, and runs in CI as "Packaging checks". It failed on #840 and #840 was merged anyway.

That check is the only thing standing between a missing module and a dead till. It cost a shop its handsets this morning and it nearly went out on an installer this afternoon. Worth making it a required check on develop so the button cannot be pressed through it.

The fix

Two lines in build.files. No extraResources entry is needed: only main.js, kot-manager.js and order-alert.js require them, and all three live in the asar — unlike server.js, which runs from the resources root, which is what made #830 subtle.

node scripts/check-packaged-modules.js now reports all 51 local requires packaged. Desktop suite 2832 pass.

src/main.js, src/kot-manager.js and src/order-alert.js all require
src/kitchen-announce.js, and order-alert also requires
src/kitchen-call.js. Neither was in build.files, so neither was in the
installer.

main.js requires one of them, so this is not a quiet degradation on a
customer machine. It is "Cannot find module" at startup.

This is the same failure that took a shop's handsets down this morning -
a module written, correct, tested, and packaged where nothing could
reach it - and it is the second one today.

The check that catches it already exists and already ran: Packaging
checks failed on #840 and it was merged anyway. The guard was not
missing, it was overruled.

Two lines in build.files. Nothing needs an extraResources entry: only
main.js, kot-manager.js and order-alert.js require them and all three
live in the asar, unlike server.js which runs from the resources root.
@sridharkalaibala
sridharkalaibala merged commit ad4398b into develop Sep 16, 2026
9 checks passed
@github-actions github-actions Bot added the ready for QA Merged to develop and live on develop.posnic.io - anyone can test it label Sep 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Merged to develop. Anyone can test this - you do not need write access.

Try it at https://develop.posnic.io, or run it yourself:

git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev   # then http://localhost:3000

When you have tested it, say what you did and what happened, and set
QA passed or QA failed. If you cannot set labels, just comment -
a maintainer will.

Reporting that something is broken is as useful as fixing it. It is
better found here than by a shopkeeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for QA Merged to develop and live on develop.posnic.io - anyone can test it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant