cocos / cocos/cocos-cli

mcp启动报错

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

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
430
Forks
154
Avg merge
2d 4h
Merged PRs (30d)
61

Description

下为log

[Scene] startup worker success, cocos version: 4.0.0

                     cocos-cli-0.0.1-alpha.24\dist\core\scene\scene-process\service\script.js:186
        globalThis.self = window;
                        ^

TypeError: Cannot set property self of #<Object> which has only a getter
    at ScriptService.init (E:\cocos-cli\cocos-cli-0.0.1-alpha.24\src\core\scene\scene-process\service\script.ts:170:24)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)

Node.js v24.7.0


 ERROR  场景进程退出异常 code:1, signal:null

检测到场景进程崩溃,准备重启...
开始重启场景进程 (第 1/3 次)
等待 2000ms 后重启...

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

Reproduce the crash with Node.js 24.7.0, then inspect src/core/scene/scene-process/service/script.ts around ScriptService.init at line 170 and compare the generated dist file shown in the log. Confirm that the scene process starts without the TypeError and no longer enters the restart loop.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.