I'm trying to display a pdf file on a web page with React.
The problem I have is that after installing react-pdf and importing import { DOCUMENT } from 'react-pdf'
the project doesn't compile, showing the following error:
./node_modules/pdfjs-dist/build/pdf.js
SyntaxError: C:\Users\mavie\Escritorio\proyecto_ui\node_modules\pdfjs-dist\build\pdf.js: Missing class properties transform.
3746 | #isInEditMode = false;
3747 | #zIndex = AnnotationEditor._zIndex++;
> 3748 | static _colorManager = new _tools.ColorManager();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3749 | static _zIndex = 1;
3750 |
3751 | constructor(parameters) {
I've tried to reinstall the library, or look for the problem but I can't find something similar to this specifically.