Skip to content

Conversation

@westng
Copy link
Member

@westng westng commented Jun 20, 2025

🐞 问题描述

在启动 MineAdmin-UI 项目时,控制台出现如下错误:

SyntaxMirror: Duplicate useI18n calling by local scope. Please don’t call it on local scope

该错误由 vue-i18n 版本升级引起,某些版本对 useI18n 的调用方式有严格限制,导致项目无法正常启动。


🔧 修改说明

为避免此问题,将 vue-i18n 的版本锁定为 11.1.2,确保与项目现有结构兼容,避免因版本差异导致启动失败。

"vue-i18n": "11.1.2"

📌 影响范围

  • vue-i18n 相关依赖管理。
  • 项目启动过程。
  • 与国际化相关的组件运行时行为。

该修改可确保 MineAdmin-UI 项目在安装依赖后能稳定运行,无需修改现有代码逻辑。

Summary by CodeRabbit

  • Chores
    • 固定了 "vue-i18n" 依赖的版本为 11.1.2,不再自动接受兼容的次要或补丁更新。

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jun 20, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jun 20, 2025

📝 Walkthrough

Walkthrough

本次变更将 web/package.jsonvue-i18n 依赖的版本号由范围符号(^11.1.2)修改为精确版本(11.1.2),限制只能使用该指定版本。

Changes

文件/分组 变更摘要
web/package.json 将 vue-i18n 依赖版本改为精确 11.1.2

Possibly related PRs

Suggested labels

dependencies

Poem

小兔挥笔更依赖,
版本锁定不徘徊。
只用 11.1.2,
升级风波不再来。
代码整齐心安在,
项目稳定乐开怀!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or PR title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@dosubot dosubot bot added bug dependencies Pull requests that update a dependency file labels Jun 20, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
web/package.json (1)

1-104: 请确认锁文件已同步更新
修改 package.json 后,请确保对应的 package-lock.jsonpnpm-lock.yaml 已经重新生成、提交并通过 CI 检查,避免因锁文件不同步导致的版本漂移问题。

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b047449 and 93ccf10.

📒 Files selected for processing (1)
  • web/package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: PHP CS Fix on PHP8.1 swoole
  • GitHub Check: build Code coverage report (ubuntu-latest, 8.1, v5.1.3)
  • GitHub Check: build
🔇 Additional comments (1)
web/package.json (1)

49-51: 锁定 vue-i18n 版本以解决启动失败
将依赖由 ^11.1.2 修改为精确 11.1.2,能规避新版本对 useI18n 本地作用域调用的严格限制,从而恢复项目正常启动。

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 20, 2025
@kanyxmo kanyxmo merged commit d01887e into mineadmin:master Jun 20, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug dependencies Pull requests that update a dependency file lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants