meteor-cli-installation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseInstall and repair the Meteor CLI
安装和修复 Meteor CLI
Make the Meteor CLI available without changing an application or deleting
state that the user did not place in scope. runs the official npm
installer and creates a user-wide Meteor installation; it does not add the
installer permanently to global npm packages.
npx meteor让 Meteor CLI 可用,同时不更改应用,也不删除用户未纳入操作范围的状态。 会运行官方 npm 安装器,并创建用户级 Meteor 安装;它不会把安装器永久添加到全局 npm 包中。
npx meteorDecision flow
决策流程
- Classify the request before changing the machine.
- Install a missing CLI when the user asks to set up Meteor or requests a local create, run, test, build, or deploy operation that requires it.
- For explanation, review, or planning only, report the missing prerequisite and the install command without running it.
- Require explicit confirmation before any recovery operation that removes
state: ,
meteor reset, npm cache clearing, targeted global metadata cleanup, uninstall, or full reinstall.meteor reset --db - When evidence makes a cleanup or reinstall plausible, suggest the least destructive option with its reason, scope, and expected state loss. Do not execute it until the user explicitly confirms that operation.
- Inspect the host and intended project. Check the operating system,
architecture, ,
node --version, CLI lookup result, andnpm --versionwhen available. In an application, readmeteor --versionbefore selecting a release..meteor/release - Distinguish the requested version:
- The npm selector in chooses an installer package.
npx meteor@<version> - A Meteor application is pinned to a framework release in
. Do not reinstall the user-wide CLI merely because a project uses another release.
.meteor/release
- The npm selector in
- For a missing CLI, PATH failure, npm installer failure, or host prerequisite, follow Installation and PATH.
- For a project release, cache reset, corrupted dev bundle, uninstall, or clean reinstall, follow Releases, reset, and reinstall. Use Reinstall decision guide before recommending a user-wide reinstall for an observed failure.
- Verify the result with . For project work, run the narrowest requested Meteor command and confirm that it resolves the release in
meteor --version. Report commands run, selected versions, state removed, and anything the user must do in a new shell..meteor/release
- 在更改机器之前,先对请求进行分类。
- 当用户要求设置 Meteor,或请求需要 CLI 的本地 create、run、test、build 或 deploy 操作时,为缺失的 CLI 执行安装。
- 如果只是解释、审查或规划,报告缺失的前置条件及安装命令,但不要运行。
- 对任何会删除状态的恢复操作,都必须事先获得明确确认:、
meteor reset、npm 缓存清理、定向全局元数据清理、卸载或完整重装。meteor reset --db - 当现有证据表明可能需要清理或重装时,应建议破坏性最小的选项,并说明其原因、影响范围和预计会丢失的状态。在用户明确确认该操作之前,不要执行。
- 检查主机和目标项目。检查操作系统、架构、、
node --version、CLI 查找结果,以及可用时的npm --version。在应用中,读取meteor --version后再选择 release。.meteor/release - 区分所请求的版本:
- 中的 npm 选择器用于选择安装器包。
npx meteor@<version> - Meteor 应用通过 固定到特定的框架 release。 不要仅仅因为项目使用了其他 release,就重新安装用户级 CLI。
.meteor/release
- 对于 CLI 缺失、PATH 故障、npm 安装器故障或主机前置条件问题,请遵循安装与 PATH。
- 对于项目 release、缓存重置、损坏的 dev bundle、卸载或干净重装,请遵循版本、重置与重装。在针对观察到的故障建议用户级重装之前,先使用重装决策指南。
- 使用 验证结果。对于项目工作,仅运行用户请求的范围最小的 Meteor 命令,并确认其解析到
meteor --version中指定的 release。报告已运行的命令、所选版本、已删除的状态,以及用户在新 shell 中必须执行的任何操作。.meteor/release
Installation rules
安装规则
| Situation | Action |
|---|---|
| Latest supported CLI | Run |
| Pinned installer package | Run |
| Linux or macOS alternative | |
| npm fallback | Run |
| Existing project needs another release | Use the project's pin or a Meteor |
Never run . Never add the npm installer to an
application's ; it is an installer, not the framework runtime.
npx install meteormeteorpackage.json| 情况 | 操作 |
|---|---|
| 最新受支持的 CLI | 运行 |
| 固定版本的安装器包 | 运行 |
| Linux 或 macOS 替代方式 | |
| npm 兜底方案 | 仅在文档列出的 |
| 现有项目需要其他 release | 使用项目固定的版本或 Meteor 的 |
绝不运行 。不要将 npm 安装器添加到应用的 中;它是安装器,而不是框架运行时。
npx install meteormeteorpackage.jsonState boundaries
状态边界
| State | Scope | Safe operation |
|---|---|---|
| User Meteor directory | Downloaded tools, releases, dev bundles, and CLI state for the user | |
| User package catalog metadata | Shared release and package metadata inside the user Meteor directory | Prefer an ordinary online catalog refresh. Treat targeted metadata rebuilding as an advanced, confirmation-required recovery. |
| Project framework release | Change through |
| Project build cache, generated state, and local development database | Suggest |
npm | Temporary installer package cache | Suggest clearing only after an |
Do not delete internal tool or dev-bundle directories selectively without a
documented command and evidence that identifies that layer. Use
for project cache corruption. Use a complete, authorized reinstall only when
the user-wide installation itself is corrupt. Never recommend hidden Meteor
administration commands as user-facing cache cleaners.
meteor reset| 状态 | 范围 | 安全操作 |
|---|---|---|
| 用户 Meteor 目录 | 为用户下载的工具、release、dev bundle 和 CLI 状态 | |
| 用户包目录元数据 | 用户 Meteor 目录内共享的 release 和包元数据 | 优先使用普通的在线目录刷新。定向重建元数据属于高级恢复操作,需要用户确认。 |
| 项目框架 release | 通过 |
| 项目构建缓存、生成状态和本地开发数据库 | 当证据指向项目缓存时,建议使用 |
npm | 临时安装器包缓存 | 仅在出现 |
不要在没有文档化命令和能够确定问题层级的证据时,选择性删除内部工具或 dev bundle 目录。对于项目缓存损坏,使用 。仅当用户级安装本身已损坏时,才使用经过授权的完整重装。绝不将隐藏的 Meteor 管理命令作为面向用户的缓存清理方式推荐。
meteor resetHandoffs
任务移交
- The CLI starts but the application fails: .
meteor-debugging - The application must move from Meteor 2 to Meteor 3: .
migrate-to-meteor-3 - A build cache or bundler failure remains after the CLI and project state are
classified: or
meteor-modern-build-stack.migrate-to-rspack - Deployment credentials, Galaxy, containers, or runtime configuration:
.
meteor-deployment
- CLI 启动后应用仍发生故障:。
meteor-debugging - 应用需要从 Meteor 2 迁移到 Meteor 3:。
migrate-to-meteor-3 - 在 CLI 和项目状态完成分类后,构建缓存或 bundler 故障仍然存在:或
meteor-modern-build-stack。migrate-to-rspack - 部署凭据、Galaxy、容器或运行时配置:。
meteor-deployment
References
参考资料
- Installation and PATH
- Releases, reset, and reinstall
- Reinstall decision guide
- Evaluation cases
- 安装与 PATH
- 版本、重置与重装
- 重装决策指南
- 评估用例