ReferenceError: _typeof is not defined /w CRA 2.0
See original GitHub issueUsing Create-React-App v2.0 i get the following error in the console, when loading Quagga. The webcam loads up fine, and displays an image, but it will not scan barcodes.
blob:http://localhost:3000/b34a09e5-04a0-495f-bcc5-91af1e544d8b:1472 Uncaught ReferenceError: _typeof is not defined
Below you can see a (maybe) more clear version of what i’m seeing.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9
Top Results From Across the Web
ReferenceError: React is not defined - Migrating from CRA to ...
The issue stemmed from CRA using the new jsx runtime to auto-import React into jsx files. Vite doesn't use the new jsx runtime...
Read more >How to solve "window is not defined" errors in React and Next.js
First solution: typeof Because typeof won't try to evaluate "window", it will only try to get its type, in our case in Node....
Read more >"Uncaught ReferenceError: process is not defined" and the ...
The Uncaught ReferenceError: process is not defined happens when when a non-existent (here: process) variable is referenced .
Read more >Typeof +pi gives an error that typeof is not defined at string to ...
The fix to this is simple and everyone is overthinking it. look at the error. it says typof is not defined, thats because...
Read more >Static Type Checking - React
Flow extends the JavaScript language with a special syntax for type annotations. ... These instructions are not for Create React App users.
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 FreeTop 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
Top GitHub Comments
I managed to bypass this problem with the following import:
I’m getting the same error, but not using CRA.
I’m running a fairly basic Rails 5 with Webpack setup, and the
_typeof is not defined
error happens when I use the Quagga NPM package and load it via Webpack (import Quagga from 'quagga'
). If I bypass Webpack and link to it directly via a<script scr="quagga.min.js">
tag (I manually downloaded the quagga.min.js file from Github), everything works fine.I don’t understand what the issue is…