Jest fails with error: Cannot find module 'react/lib/ReactComponentTreeHook'

前端 未结 4 1298
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 13:34

I have installed Jest v17.0.3 in my react project.

When I run jest locally it works fine, but on the build server it fails with:

Error: Cannot fin

4条回答
  •  -上瘾入骨i
    2021-02-05 14:02

    I had the same issue and i removed the node_modules and ran npm install and it fixed the problem.

提交回复
热议问题