jest-styled-components icon indicating copy to clipboard operation
jest-styled-components copied to clipboard

Module not found: Can't resolve 'fs' in ./node_modules/css/lib/stringify/source-map-support.js

Open harrygothold opened this issue 5 years ago • 3 comments

"jest": "24.9.0" "jest-styled-components": "^7.0.2" "styled-components": "^5.0.0"

When using the package, the tests run fine, however, when building the project (using Razzle as SSR) I get the error Module not found: Can't resolve 'fs' in ./node_modules/css/lib/stringify/source-map-support.js

I noticed an issue raised regarding it conflicting with Storybook. We have it installed, but aren't using it heavily, or to do any snapshot testing.

Can anyone help me with this issue please?

harrygothold avatar Jul 02 '20 11:07 harrygothold

I was having this issue as well @harrygothold I was using Storybook version 5 and had to switch to version 6.

JSONRice avatar Sep 10 '20 19:09 JSONRice

I'm also having the same issue and had to remove the jest-styled-components package for now. Maybe this works with a newer version off the css-package, as it is at version 3.0.0 at the moment. Would be happy if I can readd jest-styled-components again.

fmacherey avatar Oct 27 '20 15:10 fmacherey

Having it also

boazhoch avatar Jun 01 '22 12:06 boazhoch