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.

Cannot read property 'mode' of undefined

See original GitHub issue

After adding this plugin to an ejected CRA project I get:

Cannot read property 'mode' of undefined

Are we assuming some particular webpack version?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
pmmmwhcommented, Aug 27, 2020

I reproduced this by adding the Webpack conf, in webpack.config, in resolve.plugins section, not in plugins section

resolve: {
  plugins: [
    new ReactRefreshWebpackPlugin(),
  ],
}

It’s working by putting the configuration in webpack plugins section.

Well I don’t think this is something that we have to deal with … ? All plugins could fail if you use them as resolver plugins?

1reaction
paaacmancommented, Aug 27, 2020

Well I don’t think this is something that we have to deal with … ? All plugins could fail if you use them as resolver plugins?

I totally agree with you, you should not handle this case, it’s a configuration error made by us. I added this comment to help anybody who, like me, made this mistake and look for a solution here 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'mode' of undefined - Stack Overflow
Got the answer! I was using the slim version of jquery...
Read more >
Uncaught TypeError: Cannot read property 'mode' of undefined
Error is jquery.validate.min.js?ver=1.15.1:4 Uncaught TypeError: Cannot read property 'mode' of undefined in user registration plugin
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
What Causes TypeError: Cannot Read Property of Undefined ... Undefined means that a variable has been declared but has not been assigned a...
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
How to Avoid the Infamous "Cannot read properties of ... - Bitovi
Interpreting undefined or null as subtypes of all other types can lead to runtime problems. For example, if you try to get the...
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