adriantoine / enzyme-to-json

Snapshot test your Enzyme wrappers
MIT License
947 stars 64 forks source link

cannot find module 'cheerio' from 'node_modules/enzyme/build/utils.js #182

Open mmarshad opened 3 years ago

mmarshad commented 3 years ago

I just start receiving this message to my unit tests today, although it was working fine before

Cannot find module 'cheerio' from 'node_modules/enzyme/build/Utils.js'

    Require stack:
      node_modules/enzyme/build/Utils.js
      node_modules/enzyme/build/ShallowWrapper.js
      node_modules/enzyme-to-json/utils.js
      node_modules/enzyme-to-json/createSerializer.js
      node_modules/enzyme-to-json/serializer.js

      at Resolver.resolveModule (node_modules/jest-runtime/node_modules/jest-resolve/build/index.js:306:11)
      at Object.<anonymous> (node_modules/enzyme/src/Utils.js:9:1)

Is there anything changed in serlizer.js? "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.6", "enzyme-to-json": "^3.6.1",