Skip to content

修改之后无法提交 #1238

Description

@Jeffzholy
  • 问题:翻译,修改完毕之后无法提交,如下内容所示。
  • 操作步骤:1. 拉取最新内容 2. yarn 安装 3. 翻译文本 4. 提交代码失败
  • 可能问题定位:1. 运行 fix-headings 脚本失败退出,2. 翻译文件内容可能全文没有 heading ,3. 尝试修改有 heading 的文件,一样失败退出,4. 网络上搜索解决办法,没有获取到有用的信息
  • 现求助社区,希望小伙伴们帮忙
    ❯ src/**/*.md — 1 file
      ✖ yarn fix-headings [FAILED]
↓ Skipped because of errors from tasks. [SKIPPED]
✔ Reverting to original state because of errors...
✔ Cleaning up temporary files...

✖ yarn fix-headings:
Internal Error: react-dev@workspace:.: This package doesn't seem to be present in your lockfile; try to make an install to update your resolutions
    at J.getCandidates (/usr/local/lib/node_modules/yarn/bin/yarn.js:2:355536)
    at n.getCandidates (/usr/local/lib/node_modules/yarn/bin/yarn.js:2:344526)
    at /usr/local/lib/node_modules/yarn/bin/yarn.js:2:366182
    at Module.w (/usr/local/lib/node_modules/yarn/bin/yarn.js:2:425653)
    at C (/usr/local/lib/node_modules/yarn/bin/yarn.js:2:366145)
error Command failed with exit code 1.

Activity

  1. Yucohny commented on Jul 4, 2023

    @Yucohny
    Collaborator

    如果仅仅是翻译文档,可以不用 yarn 安装依赖运行。翻译文本后直接 commit 提交然后 push 到 fork 后的仓库即可。

  2. Jeffzholy commented on Jul 4, 2023

    @Jeffzholy
    ContributorAuthor

    @Yucohny 明白,只是想清楚问题来源,否则提交时还要绕开 lint-staged 检查。我再保持这个 issue 开放几天到周末,这两天如果有跟进会在这里继续讨论

  3. awxiaoxian2020 commented on Jul 4, 2023

    @awxiaoxian2020
    Collaborator

    如果仅仅是翻译文档,可以不用 yarn 安装依赖运行。翻译文本后直接 commit 提交然后 push 到 fork 后的仓库即可。

    我们的仓库有 husky 限制。

  4. locked and limited conversation to collaborators on Jul 4, 2023
  5. converted this issue into a discussion #1240 on Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions