wojtekmaj / react-pdf

Display PDFs in your React app as easily as if they were images.
https://projects.wojtekmaj.pl/react-pdf
MIT License
9.01k stars 861 forks source link

yarn dev in create-react-app-5 sample project fails with uncaught exception #1770

Closed teuber789 closed 2 months ago

teuber789 commented 2 months ago

Before you start - checklist

Description

The "create-react-app-5" sample project fails with an uncaught exception whenever running yarn dev.

$ yarn dev

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^
[Object: null prototype] {
  [Symbol(nodejs.util.inspect.custom)]: [Function: [nodejs.util.inspect.custom]]
}

Node.js v18.20.2

Steps to reproduce

# Start with a fresh copy of the repo
$ git clone git@github.com:wojtekmaj/react-pdf.git
$ cd react-pdf/sample/create-react-app-5

# Install
$ yarn install

# Run for local development
$ $ yarn dev

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^
[Object: null prototype] {
  [Symbol(nodejs.util.inspect.custom)]: [Function: [nodejs.util.inspect.custom]]
}

Node.js v18.20.2

Expected behavior

The project should build and run on the local development server

Actual behavior

It fails with the following error:

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^
[Object: null prototype] {
  [Symbol(nodejs.util.inspect.custom)]: [Function: [nodejs.util.inspect.custom]]
}

Node.js v18.20.2

Additional information

Screenshot 2024-04-27 at 12 45 05

Environment

wojtekmaj commented 2 months ago

You're right! ts-node is a load of crap. Replaced it with much more reliable tsimp. Thanks!