9router@0.4.41 fails to start: Cannot find module './src/cli/utils/input'
Summary
After updating to 9router@0.4.41, the CLI fails during startup with the following error:
Error: Cannot find module './src/cli/utils/input'
Require stack:
- /home/zvwgvx/.nvm/versions/node/v22.21.1/lib/node_modules/9router/cli.js
I am opening this issue to report the startup failure and provide the relevant environment and logs.
Environment
OS: Ubuntu 26.04 LTS
Service manager: systemd
Node.js: v22.21.1
Package version: 9router@0.4.41
Install method: global npm install
Runtime port: 20128
The service is started with:
9router --host 0.0.0.0 --port 20128
Expected behavior
9router@0.4.41 should start normally after installation:
npm install -g 9router@0.4.41
9router --host 0.0.0.0 --port 20128
Actual behavior
The process fails with:
Error: Cannot find module './src/cli/utils/input'
Require stack:
- /home/zvwgvx/.nvm/versions/node/v22.21.1/lib/node_modules/9router/cli.js
When running under systemd, the service repeatedly restarts.
Steps to reproduce
npm install -g 9router@0.4.41
9router --host 0.0.0.0 --port 20128
Result:
[9router][runtime] npm install better-sqlite3@12.6.2 --no-audit --no-fund --prefer-online --no-save (cwd: /home/zvwgvx/.9router/runtime)
Error: Cannot find module './src/cli/utils/input'
Require stack:
- /home/zvwgvx/.nvm/versions/node/v22.21.1/lib/node_modules/9router/cli.js
Logs
systemctl status 9router:
● 9router.service - 9router API Gateway
Loaded: loaded (/etc/systemd/system/9router.service; enabled; preset: enabled)
Active: active (running) since Thu 2026-05-14 12:33:38 +07
Process: 1427906 ExecStartPre=/home/zvwgvx/.nvm/versions/node/v22.21.1/bin/npm install -g 9router@latest
Main PID: 1427970 (node)
Tasks: 22
Memory: 280.4M
CPU: 7.339s
CGroup: /system.slice/9router.service
├─1427970 node /home/zvwgvx/.nvm/versions/node/v22.21.1/bin/9router --host 0.0.0.0 --port 20128
└─1428097 "next-server (v16.2.1)"
May 14 12:33:34 ubnt-server systemd[1]: 9router.service: Scheduled restart job, restart counter is at 73.
May 14 12:33:34 ubnt-server systemd[1]: Starting 9router.service - 9router API Gateway...
May 14 12:33:38 ubnt-server npm[1427906]: changed 10 packages in 4s
May 14 12:33:38 ubnt-server systemd[1]: Started 9router.service - 9router API Gateway.
May 14 12:33:38 ubnt-server 9router[1427970]: [9router][runtime] npm install better-sqlite3@12.6.2 --no-audit --no-fund --prefer-online --no-save
Manual run:
9router
[9router][runtime] npm install better-sqlite3@12.6.2 --no-audit --no-fund --prefer-online --no-save (cwd: /home/zvwgvx/.9router/runtime)
Error: Cannot find module './src/cli/utils/input'
Require stack:
- /home/zvwgvx/.nvm/versions/node/v22.21.1/lib/node_modules/9router/cli.js
Additional notes
During startup, 9router also attempts to install better-sqlite3@12.6.2 into the runtime directory:
[9router][runtime] npm install better-sqlite3@12.6.2 --no-audit --no-fund --prefer-online --no-save (cwd: /home/zvwgvx/.9router/runtime)
At one point, this process was killed:
However, after installing better-sqlite3@12.6.2 manually, the CLI still failed with the same missing module error.
Possible area to check
The error appears to come from cli.js requiring:
Could you please check whether this file is included in the published 9router@0.4.41 npm package, or whether the CLI entry should reference a built output file instead?
Thank you.
9router@0.4.41fails to start:Cannot find module './src/cli/utils/input'Summary
After updating to
9router@0.4.41, the CLI fails during startup with the following error:I am opening this issue to report the startup failure and provide the relevant environment and logs.
Environment
The service is started with:
Expected behavior
9router@0.4.41should start normally after installation:Actual behavior
The process fails with:
When running under systemd, the service repeatedly restarts.
Steps to reproduce
Result:
Logs
systemctl status 9router:● 9router.service - 9router API Gateway Loaded: loaded (/etc/systemd/system/9router.service; enabled; preset: enabled) Active: active (running) since Thu 2026-05-14 12:33:38 +07 Process: 1427906 ExecStartPre=/home/zvwgvx/.nvm/versions/node/v22.21.1/bin/npm install -g 9router@latest Main PID: 1427970 (node) Tasks: 22 Memory: 280.4M CPU: 7.339s CGroup: /system.slice/9router.service ├─1427970 node /home/zvwgvx/.nvm/versions/node/v22.21.1/bin/9router --host 0.0.0.0 --port 20128 └─1428097 "next-server (v16.2.1)" May 14 12:33:34 ubnt-server systemd[1]: 9router.service: Scheduled restart job, restart counter is at 73. May 14 12:33:34 ubnt-server systemd[1]: Starting 9router.service - 9router API Gateway... May 14 12:33:38 ubnt-server npm[1427906]: changed 10 packages in 4s May 14 12:33:38 ubnt-server systemd[1]: Started 9router.service - 9router API Gateway. May 14 12:33:38 ubnt-server 9router[1427970]: [9router][runtime] npm install better-sqlite3@12.6.2 --no-audit --no-fund --prefer-online --no-saveManual run:
Additional notes
During startup,
9routeralso attempts to installbetter-sqlite3@12.6.2into the runtime directory:At one point, this process was killed:
However, after installing
better-sqlite3@12.6.2manually, the CLI still failed with the same missing module error.Possible area to check
The error appears to come from
cli.jsrequiring:Could you please check whether this file is included in the published
9router@0.4.41npm package, or whether the CLI entry should reference a built output file instead?Thank you.