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 'toUpperCase' of null

See original GitHub issue

TL;DR This is the repo reproducing the problem.

I am using the critters plugin alongside html-webpack-plugin and mini-css-extract-plugin, I installed bulma and imported it my main js file.

When I build the project I get the fallowing error:

ERROR in   TypeError: Cannot read property 'toUpperCase' of null

  - critters.js:39 Node.get
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:39:33


  - nwmatcher.js:1444 Object.match
    [Critters Error]/[nwmatcher]/src/nwmatcher.js:1444:38


  - nwmatcher.js:1626 select
    [Critters Error]/[nwmatcher]/src/nwmatcher.js:1626:43

  - nwmatcher.js:1451 Object.first
    [Critters Error]/[nwmatcher]/src/nwmatcher.js:1451:14

  - critters.js:117 Node.querySelector
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:117:28

  - critters.js:359
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:359:37

  - Array.filter

  - critters.js:357
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:357:49

  - critters.js:166
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:166:16

  - Array.filter

  - critters.js:162 walkStyleRules
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:162:29

  - critters.js:161 walkStyleRules
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:161:18

  - critters.js:355 Critters.<anonymous>
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:355:9

  - new Promise

  - critters.js:345 Critters.processStyle
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:345:12

  - critters.js:254
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:254:76

  - Array.map

  - critters.js:254 Critters.$If_2
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:254:39

  - critters.js:244 Critters.<anonymous>
    [Critters Error]/[critters-webpack-plugin]/dist/critters.js:244:34

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
fpapadocommented, Aug 27, 2018

Here’s a snippet that surfaces this for me, if it helps 😃

.stripe-light:nth-child(odd) {
  background-color: gray;
}
1reaction
developitcommented, Dec 11, 2018

I believe this should be fixed now btw. If anyone happens to check and confirm, let me know!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'toUpperCase' of null
i think the error message is indicating the mistake of the code. This happens when SecondAnswer is null. To ...
Read more >
TypeError: Cannot read property 'toUpperCase' of null
I submit my code and it says: Oops, try again and on the console it says: TypeError: Cannot read property 'toUpperCase' of null,...
Read more >
Cannot read property 'toUpperCase' of Undefined in JS
The "Cannot read property 'toUpperCase' of undefined" error occurs when calling the toUpperCase() method on an undefined value. To solve the error, initialize ......
Read more >
Uncaught TypeError: Cannot read property 'toUpperCase' of ...
This error occurs when a property is read or a function is called on an undefined variable. Undefined means that a variable has...
Read more >
typeerror cannot read property 'touppercase' of null
When I use Gpay button on fast checkout, it works without any error. But If I use Stripe's payment button (purple one), I...
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