【问题标题】:While resolving: codelyzer@0.0.28 npm ERR! Found: tslint@6.1.3 npm ERR! node_modules/tslint npm ERR! optional tslint@"6.1.3" from the root project解析时:codelyzer@0.0.28 npm ERR!发现:tslint@6.1.3 npm 错误! node_modules/tslint npm 错误!来自根项目的可选 tslint@\"6.1.3\"
【发布时间】:2023-01-20 00:08:28
【问题描述】:

我试图在 angular 15.0.4 项目中添加角度元素并发现以下错误

任何帮助将不胜感激!

【问题讨论】:

    标签: angular


    【解决方案1】:

    tslint 的对等依赖项存在冲突,您可能需要共享您的 package.json 以获取更多信息

    或者你也可以使用“npm i --legacy-peer-deps”但它可能会破坏一些依赖

    或者你可以使用 eslint -

    tslint 和 codelyzer 已从 angular 11 开始弃用, 你应该在 angular 15 中使用 eslint 有关 tslint 、 codelyzer 和 eslint 的更多信息,您可以参考 -

    迁移指南 - https://github.com/angular-eslint/angular-eslint#migrating-from-codelyzer-and-tslint

    typescript-eslint-https://github.com/typescript-eslint/typescript-eslint

    角度 eslint - https://github.com/angular-eslint/angular-eslint

    tslint-to-eslint-config-https://github.com/typescript-eslint/tslint-to-eslint-config

    【讨论】:

      猜你喜欢
      • 2016-12-17
      • 2023-04-08
      • 1970-01-01
      • 2018-11-06
      • 2023-03-07
      • 2019-04-17
      • 2017-12-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多