你好,我目前正在更新存储库到最新的软件包版本后,分级酶和其他几个npm的,我在运行测试任务时遇到错误,但无法跟踪为什么会发生这种情况,解决方案是否有人遇到过类似的?
● Test suite failed to run
Cannot find module 'entities/lib/escape.js' from 'index.js'
Require stack:
node_modules/parse5/dist/cjs/serializer/index.js
node_modules/parse5/dist/cjs/index.js
node_modules/cheerio/lib/parsers/parse5-adapter.js
node_modules/cheerio/lib/index.js
node_modules/enzyme/build/Utils.js
node_modules/enzyme/build/ReactWrapper.js
node_modules/enzyme/build/index.js
internals/jest/setupJest.js
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:299:11)
at Object.<anonymous> (node_modules/parse5/dist/cjs/serializer/index.js:5:21)发布于 2022-07-28 20:20:53
因此,我刚刚在实体中遇到了这个问题,特别是escape.js。对我来说,无论出于什么原因,实体似乎是依赖关系的依赖,而不是依赖,我自己安装的,不在我的npm i entities中,而且它似乎也没有正确安装,从而导致了问题,并且npm实体将得到最讨厌的版本,包括escape.js。
https://stackoverflow.com/questions/72430648
复制相似问题