Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

锁定版本都会受到影响,提示node版本不兼容 #120

Open
giscafer opened this issue Jan 18, 2022 · 2 comments
Open

锁定版本都会受到影响,提示node版本不兼容 #120

giscafer opened this issue Jan 18, 2022 · 2 comments

Comments

@giscafer
Copy link

giscafer commented Jan 18, 2022

试了2.6.0、2.6.2 锁定版本,都会自动升级。

node 版本 v14.16.0

error @typescript-eslint/[email protected]: The engine "node" is incompatible with this module. Expected version "^12.22.0 || ^14.17.0 || >=16.0.0". Got "15.3.0"
"@umijs/fabric@^2.0.0", "@umijs/fabric@^2.2.2", "@umijs/fabric@^2.5.6":
  version "2.10.1"
  resolved "https://registry.npmmirror.com/@umijs/fabric/download/@umijs/fabric-2.10.1.tgz#4d56243d175c85acc12efefc2b47772f051da14e"
  integrity sha512-loRxdPvqyGleywhC1Ms0lHf8OUpjAM09GeGkadKpftvepRaWXyfxV+vynKWMY3es3JZqbhyCDSPmcxBZJSn0qw==
  dependencies:
    "@babel/core" "^7.12.10"
    "@babel/eslint-parser" "^7.12.1"
    "@babel/plugin-proposal-class-properties" "^7.13.0"
    "@babel/plugin-proposal-decorators" "^7.13.5"
    "@babel/preset-env" "^7.12.11"
    "@babel/preset-react" "^7.12.10"
    "@babel/preset-typescript" "^7.12.7"
    "@typescript-eslint/eslint-plugin" "^5.8.1"  // 这里
    "@typescript-eslint/parser" "^5.9.0"
    chalk "^4.1.1"
    eslint "^7.11.0"
    eslint-config-prettier "^8.3.0"
    eslint-formatter-pretty "^4.0.0"
    eslint-plugin-babel "^5.3.0"
    eslint-plugin-jest "^24.0.1"
    eslint-plugin-promise "^5.0.0"
    eslint-plugin-react "^7.21.5"
    eslint-plugin-react-hooks "^4.1.2"
    eslint-plugin-unicorn "^20.0.0"
    fast-glob "^3.2.4"
    os-locale "^5.0.0"
    prettier "^2.3.2"
    prettier-plugin-two-style-order "^1.0.0"
    stylelint "^13.0.0"
    stylelint-config-css-modules "^2.2.0"
    stylelint-config-prettier "^8.0.1"
    stylelint-config-standard "^20.0.0"
    stylelint-declaration-block-no-ignored-properties "^2.1.0"
    typescript "^4.5.4"

使用umi 的时候,类似的情况遇到过,上次是 dumi 的某个依赖(见这里)。这次是fabric。导致ci 环境总是在做node版本变更。

建议不影响原来版本。

@giscafer
Copy link
Author

看了 action ,测试是走通的。应该是最近typescript-eslint/typescript-eslint 更新了 导致node.js 版本依赖变更 typescript-eslint/typescript-eslint@8894106

"@typescript-eslint/eslint-plugin@^5.8.1":
  version "5.10.0"
  resolved "https://registry.npmmirror.com/@typescript-eslint/eslint-plugin/download/@typescript-eslint/eslint-plugin-5.10.0.tgz#e90afea96dff8620892ad216b0e4ccdf8ee32d3a"
  integrity sha512-XXVKnMsq2fuu9K2KsIxPUGqb6xAImz8MEChClbXmE3VbveFtBUU5bzM6IPVWqzyADIgdkS2Ws/6Xo7W2TeZWjQ==
  dependencies:
    "@typescript-eslint/scope-manager" "5.10.0"
    "@typescript-eslint/type-utils" "5.10.0"
    "@typescript-eslint/utils" "5.10.0"
    debug "^4.3.2"
    functional-red-black-tree "^1.0.1"
    ignore "^5.1.8"
    regexpp "^3.2.0"
    semver "^7.3.5"
    tsutils "^3.21.0"

@giscafer
Copy link
Author

临时解决 package.json 加入

"resolutions": {
        "@typescript-eslint/eslint-plugin": "5.8.1"
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant