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.

ReferenceError: b is not defined

See original GitHub issue

Apologies if this is out of scope, but I have a bug in webpack 4 with --mode production.

It appears it is a result of the optimization.minimize config, turning minimize off fails to reproduce the issue. I couldn’t identify which uglify option specifically causes it though.

"dependencies": {
  "graphiql": "^0.11.11",
  "graphql": "^0.11.7",
  "codemirror": "^5.36.0",
  "codemirror-graphql": "^0.6.12",
  "react": "^16.2.0",
  "react-dom": "^16.2.0"
}
screen shot 2018-03-27 at 14 49 06

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
jimmybrawncommented, Apr 17, 2018

So we’ve fixed it by doing the following in webpack 4:

 minimizer: [
      new UglifyJsPlugin({
        cache: true,
        parallel: true,
        uglifyOptions: {
          compress: false,
          ecma: 6,
          mangle: true
        }
      })
    ]

this seems to work on production

0reactions
acaocommented, Dec 1, 2019

@sekharp the current webpack 4 example we have, which uses webpack’s new alternative to uglify (the name escapes me) is out and working with 0.17.0, please give that a try with webpack 4 if you can? or maybe it will work with uglifyjs plugin again too?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ReferenceError: "x" is not defined - JavaScript - MDN Web Docs
The JavaScript exception "variable is not defined" occurs when there is a non-existent variable referenced somewhere.
Read more >
ReferenceError: $ is not defined - javascript - Stack Overflow
It's one of the common mistake everybody make while working with jQuery, Basically $ is an alias of jQuery() so when you try...
Read more >
'Uncaught ReferenceError: b is not defined' for 'Hipster Hack #1
'Uncaught ReferenceError: b is not defined' for 'Hipster Hack #1 — Swap variables'.” is published by Yogi.
Read more >
What's ReferenceError: x is not defined in JavaScript? - Frendly
The ReferenceError is an error thrown by the JavaScript engine when it looks to find a variable or function within the available scope...
Read more >
JavaScript ReferenceError - variable is not defined
This JavaScript exception variable is not defined occurs if there is a non-existent variable that is referenced somewhere. ... Cause of Error:.
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