标签: dependency-tree

React 18 的 create-react-app 依赖版本问题

npx create-react-app my-project导致以下依赖错误:

npx版本:8.5.0

Installing template dependencies using npm...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: react-18@0.1.0
npm ERR! Found: react@18.0.0
npm ERR! node_modules/react
npm ERR!   react@"^18.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"<18.0.0" from @testing-library/react@12.1.5
npm ERR! node_modules/@testing-library/react
npm ERR!   @testing-library/react@"^12.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! …
Run Code Online (Sandbox Code Playgroud)

npm create-react-app dependency-tree react-18

28
推荐指数
2
解决办法
4万
查看次数

运行“npmauditfix--force”会降级反应脚本

我的 React 项目有一个很大的问题。
我正在尝试更新项目中的库,但出了问题。

这是package.json. 请注意,react-scripts版本设置为"^4.0.3".

{
  "name": "server",
  "version": "1.1.0",
  "description": "",
  "main": "index.js",
  "engines": {
    "node": "v14.16.0",
    "npm": ">=7.6.0"
  },
  "scripts": {
    "start": "node index.js",
    "server": "nodemon index.js",
    "client": "npm run start --prefix client",
    "dev": "concurrently \"npm run server\" \"npm run client\"",
    "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.19.0",
    "concurrently": "^5.3.0",
    "cookie-parser": "^1.4.5",
    "cookie-session": "^1.4.0",
    "cors": "^2.8.5",
    "express": …
Run Code Online (Sandbox Code Playgroud)

node.js package.json dependency-tree npm-audit npm-vulnerabilities

20
推荐指数
2
解决办法
2万
查看次数

修复 npm 漏洞

我正在学习 TypeScript 教程。
不幸的是,这些软件包已经过时,我收到了有关漏洞的警告。

我遵循了npm check 和 update package if need 的一系列建议,即:

  • npm audit fix
  • npm audit fix --force
  • npm update

npm audit说还剩下24个漏洞。
但上述命令都无法修复它们。

npm outdated结果没有输出。

易受攻击的软件包是:

ansi-regex
glob-parent
node-forge
nth-check
postcss
Run Code Online (Sandbox Code Playgroud)

我实际上不知道为什么它们是我项目的一部分。我的 里没有它们package.json

修复这些漏洞的后续步骤是什么?

以下是我尝试过的。

dependencies node.js dependency-tree npm-audit npm-vulnerabilities

7
推荐指数
1
解决办法
4547
查看次数

Android Flavor 特定的依赖树

我的 Android 应用程序有多种风格:ProductionStagingReview等,以及ReleaseDebug构建类型。当我运行./gradlew app:dependencies它时,它自然会返回一个具有每种风格/构建类型的依赖树:

  • 生产发布
  • 生产调试
  • 分期发布
  • 登台调试
  • 等等。

这导致依赖树超过 32000 行,使其有点难以评估。我正在寻找的是一个依赖命令,我可以在其中指定风格和构建类型以避免出现可怕的依赖树报告,例如:

./gradlew app:stagingDebugDependencies

非常感谢任何帮助、提示和/或提示。

android gradle android-studio dependency-tree

2
推荐指数
1
解决办法
382
查看次数

如何从 mvn dependency:tree 中排除所有测试 jars*

有没有办法排除测试目标期间使用的依赖项?例如,我想避免将所有*:testsjar 打印出来mvn dependency:tree

[INFO] Building test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ test ---
[INFO] com.test.test:jar:1.0-SNAPSHOT
[INFO] +- junit:junit:jar:4.13:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.specs2:specs2-core_2.13:jar:4.8.3:test
[INFO] |  +- org.specs2:specs2-matcher_2.13:jar:4.8.3:test
[INFO] |  +- org.specs2:specs2-common_2.13:jar:4.8.3:test
[INFO] |  |  +- org.specs2:specs2-fp_2.13:jar:4.8.3:test
[INFO] |  |  \- org.scala-lang.modules:scala-parser-combinators_2.13:jar:1.1.2:compile
[INFO] |  \- org.scala-sbt:test-interface:jar:1.0:test
[INFO] +- org.scalatest:scalatest_2.13:jar:3.1.0:test
[INFO] |  +- org.scalactic:scalactic_2.13:jar:3.1.0:test
[INFO] |  +- org.scala-lang:scala-reflect:jar:2.13.1:test
[INFO] \- com.fasterxml.jackson.core:jackson-databind:jar:2.10.2:compile
Run Code Online (Sandbox Code Playgroud)

许多 jar 在编译阶段使用,而其他在测试阶段使用。我正在寻找:

mvn dependency:tree -Dexcludes=org.apache.maven*
Run Code Online (Sandbox Code Playgroud)

所以我想知道是否可以*tests通过命令行直接排除所有。

jar maven dependency-tree

2
推荐指数
1
解决办法
617
查看次数

如何仅为多模块项目中的特定模块生成依赖关系树 - MAVEN

我有多模块项目。例如: x |_b |_c 当我运行命令 mvn dependency : tree 这将输出模块“b”和“c”的依赖树

我知道我们可以使用此命令 mvn -f modulename/pom.xml dependency:tree 来获取特定的模块依赖关系树

有没有办法仅使用特定模块的 groupId、artifactId 和版本来生成依赖关系树。

maven multi-module dependency-tree

1
推荐指数
1
解决办法
2545
查看次数

python - 解析maven依赖树

我希望能够将 maven 依赖树作为输入并通过它进行解析以确定每个依赖项的 groupId、artifactId 和版本及其子(ren)(如果有)和子(ren)的 groupId 、artifactId 和 version(以及任何额外的 child(ren) 等等)。我不确定在为 neo4j 准备数据之前通过 mvn 依赖关系树解析并将信息存储为嵌套字典是否最有意义。

我也不确定解析整个 mvn 依赖树的最佳方法。下面的代码是我在尝试解析、删除前面不必要的信息和标记孩子或父母方面取得的最大进展。

tree= 
[INFO] +- org.antlr:antlr4:jar:4.7.1:compile
[INFO] |  +- org.antlr:antlr4-runtime:jar:4.7.1:compile
[INFO] |  +- org.antlr:antlr-runtime:jar:3.5.2:compile
[INFO] |  \- com.ibm.icu:icu4j:jar:58.2:compile
[INFO] +- commons-io:commons-io:jar:1.3.2:compile
[INFO] +- brs:dxprog-lang:jar:3.3-SNAPSHOT:compile
[INFO] |  +- brs:libutil:jar:2.51:compile
[INFO] |  |  +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] |  |  +- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] |  |  |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
    [INFO] |  |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.5:compile
.
.
.


fileObj = open("tree", "r")

for line in fileObj.readlines():
    for word in …
Run Code Online (Sandbox Code Playgroud)

python parsing neo4j maven dependency-tree

0
推荐指数
1
解决办法
897
查看次数