MoonshotAI / MoonshotAI/kimi-code

fix(web): dev:stub command fails because dev/stub-daemon.mjs is missing

Open
#949 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Bug description

The dev:stub script in apps/kimi-web/package.json points to dev/stub-daemon.mjs, but that file does not exist on the main branch. Running the command fails with MODULE_NOT_FOUND.

Reproduction steps
  1. Clone the repo and checkout main
  2. Run:
    pnpm -C apps/kimi-web run dev:stub
    
  3. Observe the error:
    Error: Cannot find module '/.../kimi-code/apps/kimi-web/dev/stub-daemon.mjs'
    code: 'MODULE_NOT_FOUND'
    
Expected behavior

The dev:stub command should start a local stub daemon for offline development, as documented in apps/kimi-web/README.md.

Actual behavior

The command crashes immediately because apps/kimi-web/dev/ directory and stub-daemon.mjs are missing.

Environment
  • Branch: main
  • Node.js: 24.15.0
  • pnpm: 10.33.0
Additional context
  • The file is not tracked in origin/main (git ls-tree -r --name-only origin/main | grep stub-daemon returns nothing).
  • The directory apps/kimi-web/dev/ does not exist.
  • The file is not ignored by .gitignore.
  • The file does exist in repository history on other branches (git log --all -- apps/kimi-web/dev/stub-daemon.mjs shows commits), but it never made it to main or was removed at some point.
  • README.md still documents this command in the "Offline / no server" section.

I’m happy to help restore or rewrite the stub daemon if the team confirms the intended behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the dev:stub script in apps/kimi-web/package.json and the Offline / no server section of apps/kimi-web/README.md, then review repository history for apps/kimi-web/dev/stub-daemon.mjs. Run pnpm -C apps/kimi-web run dev:stub to confirm the current failure; done means the documented command starts the local stub daemon without MODULE_NOT_FOUND.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
devtools, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.