menu

styled-components

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress!

Channels
Chat
view-forward
# All channels
view-forward
# General
view-forward
# Help
view-forward
# jest
view-forward
# Off Topic
view-forward
# Website
view-forward
Team

css.parse is not a function

January 15, 2020 at 7:47pm

css.parse is not a function

January 15, 2020 at 7:47pm
I've been getting this error whenever testing with jest-styled-components. To combat this with v4, I made a fork that fixes the import culprit: https://github.com/dmitrizzle/jest-styled-components/blob/master/src/utils.js#L1
Basically, Node seems to be failing to follow the import link in the index.js of css package. I've tested it with Node 8 & 10 with jest.
Now that v5 is out, I was hoping that maybe someone would have a solution or answer to fix this properly. Note that this did not start to happen immediately, but some time after working with jest-styled-components
No messages yet