Error when used in create-react-app build (but not development)
See original GitHub issueI’m pretty new to web development, so I’m not sure if this is something you can help with. I’m getting an error of the form:
ReferenceError: o is not defined
at e (blob:http://localhost:5000/2bdae74b-66c2-443f-8a8f-6b18edc7fb4c:1:313)
at blob:http://localhost:5000/2bdae74b-66c2-443f-8a8f-6b18edc7fb4c:1:352
The stack trace is all minified, but the top looks like this:
e (2bdae74b-66c2-443f-8a8f-6b18edc7fb4c:formatted:23)
(anonymous) (2bdae74b-66c2-443f-8a8f-6b18edc7fb4c:formatted:27)
Worker Created (async)
t.exports (image-blob-reduce.esm.mjs:1613)
w (image-blob-reduce.esm.mjs:1689)
n.acquire (image-blob-reduce.esm.mjs:575)
(anonymous) (image-blob-reduce.esm.mjs:1933)
(anonymous) (image-blob-reduce.esm.mjs:1932)
Promise.then (async)
(anonymous) (image-blob-reduce.esm.mjs:1930)
(anonymous) (image-blob-reduce.esm.mjs:2016)
Is this expected to work with Create React App? Why might it be failing only in a production build? As far as I can tell, everything is fine until I get to a call to toBlob()
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
reactjs - Error while creating new React app ("You are running ...
1. First clear the cache · 2. Now run this command, this will uninstall the old version, install the latest one and create...
Read more >react-scripts fails to build project with Node 17 #11562 - GitHub
Describe the bug we have a CRA app, it used to build with Node 14.x very fine, today I upgrade nodejs to 17.0.0...
Read more >How to fix build failures with `create-react-app` in production
If your build is using create-react-app and has been failing since approximately the 18th of June 2020, this post will help you fix...
Read more >Troubleshooting - Create React App
Check that your file is imported by your entrypoint. TypeScript will show errors on any of your source files, but webpack only reloads...
Read more >create-react-app not working ⚠️ error solved - YouTube
In this video, we will solve the error in reactjs that We no longer support global installation of Create React App. ✔️ create...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had a problem where it looked like this in production
I realized it is probably because create-react-app webpack configs doesn’t have great webworker support (have to use worker-loader and rewire or other crazy stuff)
I fixed by turning off the webworker option in the pica instance that we pass to the ImageBlobReduce constructor
Sorry, no ideas, i don’t use react an not familiar with it’s bundler.