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.

Uncaught ReferenceError: n is not defined

See original GitHub issue

I’m using image-blob-reduce in a next.js app. In dev mode it works fine, but in prod mode, I get this error:

Uncaught ReferenceError: n is not defined

Screenshot 2022-01-17 at 16 30 43

It happens in the pica source:

Screenshot 2022-01-17 at 17 05 08

I already tried turning off Terser, did not change anything.

Do you have any ideas what I could change to get this to work?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
puzrincommented, Jan 22, 2022

Too bad that combining browserify + rollup + webpack seems to be problematic

That works. I don’t know why you have problems.

Out of curiosity: is code-deduplication a requirement too, or could the code be duplicated in a string literal in the same file to be used by the web worker?

At current moment i don’t know good alternatives to existing approach. Everything was already considered.

1reaction
puzrincommented, Jan 17, 2022

I’m closing this, but if you find anything to mention on readme - let me know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Uncaught ReferenceError: n is not defined " - Stack Overflow
Trouble returning simple array: "Uncaught ReferenceError: n is not defined " ... I have an error telling me metaData[price] is not defined.
Read more >
Uncaught ReferenceError: n is not defined #4348 - GitHub
Hello, this is a project where I wrap mapbox-gl in react-mapbox-gl. The project is build with webpack. Since a couple of hours, ...
Read more >
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 >
3 Ways to Solve jQuery - Uncaught ReferenceError: $ is not ...
1) One of the most common reason of "ReferenceError: $ is not defined" in jQuery based application is that jQuery plugin is included...
Read more >
Uncaught ReferenceError: Angular is not defined
In this article, we will see the “Uncaught ReferenceError: Angular is not defined”, along with knowing a possible way to resolve it.
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