ERROR: Cannot find module 'entities/lib/escape.js' from 'index.js'

Viewed 281

Hello i'm currently updating the repository to newest packages versions after grading enzyme and few other npm's i got error when running the test task but can't track why this is happen and the solution have anyone encountered smth similiar before?

ā— 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)
1 Answers

so I have just run into this issue with entities, specifically escape.js. For me I had to npm i entities as for whatever reason entities appears to be a dependency of a dependency but not a dependency I had myself installed and wasn't in my package.json and it also appears to not installed properly thus causing the issue and npm i'ing entities will get the most resent version including escape.js.

https://www.npmjs.com/package/entities

Related