travis cannot build because Error: Cannot find module 'react-test-renderer/shallow'

人走茶凉 提交于 2019-12-01 19:54:35
Anthony

Just ran into the same issue today as well.

looks like react-addons-test-utils was deprecated https://www.npmjs.com/package/react-addons-test-utils

You can probably get away with replacing that line in your package.json with

"react-test-renderer": "^15.5.4"

https://www.npmjs.com/package/react-test-renderer

Hope that helps!

Just i want to elaborate answer of @Anthony and dive on it :

So , this is all updates that should be done :

  • Upgrade react, react-dom and enzyme .

  • Replace react-addons-test-utils by react-test-renderer .

And here the build was passing via Travis.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!