question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: Cannot read property 'transparent' of undefined

See original GitHub issue

Hi,

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:open
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mrob11commented, May 14, 2019

Works now! Thank you @bradlc

0reactions
alanonthegitcommented, May 15, 2019

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, but bg-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.

image image image


And just as a clarifying point, I can change my color class values on the tailwind config and this macro should still work, right?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found