create-react-app 为什么Jest 26.6.3与需要Jest 26.6.0的CRA不兼容?要求过于严格吗?

dddzy1tm  于 22天前  发布在  React
关注(0)|答案(4)|浏览(22)
$ react-scripts start

There might be a problem with the project dependency tree.
It is likely not a bug in Create React App, but something you need to fix locally.

The react-scripts package provided by Create React App requires a dependency:

  "jest": "26.6.0"

Don't try to install it manually: your package manager does it automatically.
However, a different version of jest was detected higher up in the tree:

  C:\dev\react-scss-jest-typescript\node_modules\jest (version: 26.6.3)
qqrboqgw

qqrboqgw1#

我正在经历相同的问题。我不得不将jest降级到26.6.0

dwthyt8l

dwthyt8l2#

我认为将Jest升级到26.6.3可以解决这个问题。我已经准备好了一个MR来实现这个升级。有人能给我推送一个分支的权限吗?我还想贡献一些安全更新。
@gaearon,看起来你可以授权给我这样的权限吗?

qco9c6ql

qco9c6ql3#

CRA默认会验证包树。如果您更倾向于忽略此检查,可以在项目中的.env文件中添加SKIP_PREFLIGHT_CHECK=true

00jrzges

00jrzges4#

这个问题已经被自动标记为过时,因为它没有任何最近的活动。如果没有发生任何进一步的活动,它将在5天后被关闭。

相关问题