TypeError: Cannot read property 'transparent' of undefined
See original GitHub issueHi,
I’m using Gatsby and if I use “bg-”, it throws the following error:
const NuForm = styled(Form)`
${tw`bg-transparent uppercase inline-flex list-reset text-white`};
`
TypeError: Cannot read property ‘transparent’ of undefined
If I don’t use bg everything works fine. And it’s not just for a specific type of component, it happens as soon as I use “bg-” with any color.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Cannot read property 'opacity' of undefined
The error message shows since you're trying to call the style that is an attribute of DOM object on jQuery object, you could...
Read more >babel-plugin-tailwind-components - Bountysource
TypeError : Cannot read property 'transparent' of undefined $ 0. Created 3 years ago in bradlc/babel-plugin-tailwind-components with 7 comments. Hi,. I' ...
Read more >Avoiding those dang cannot read property of undefined errors
Uncaught TypeError: Cannot read property 'foo' of undefined. The dreaded error we all hit at some point in JavaScript development.
Read more >typeerror: cannot read properties of undefined (reading 'redirect')
Your issue is that your .find() method is returning undefined , so you can't access properties on product such as .name as it...
Read more >Edit Image - Transparent Issues - Questions - n8n community
Hey there, I am trying to use the edit image, transparent function. ... TypeError: Cannot read properties of undefined (reading 'forEach') ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Works now! Thank you @bradlc
hey @bradlc I’m having the same issue (first time setting this up so I may be screwing up something), but I’m using a version of Tailwind that is before 1.0 (.0.7.4).
When I use my custom tailwind.js file, or even a default one, values like
text-center p-2 rounded
work, butbg-red
gives out an error.I’m on gatsby v2 and also have the “gatsby-plugin-styled-components” and "babel-plugin-styled-components.
Any pointers? Much appreciated. It seems like some tailwind classes work fine, while
bg
ones are not.And just as a clarifying point, I can change my color class values on the tailwind config and this macro should still work, right?