wojtekmaj / react-pdf

Display PDFs in your React app as easily as if they were images.

Home Page:https://projects.wojtekmaj.pl/react-pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Module parse failed: Unexpected token

sahinpathan opened this issue · comments

Before you start - checklist

  • I followed instructions in documentation written for my React-PDF version
  • I have checked if this bug is not already reported
  • I have checked if an issue is not listed in Known issues
  • If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo

Description

I am currently using the versions "react-pdf": "4.1.0" and "react": "^16.1.1". Previously, my implementation with react-pdf was functioning correctly. However, yesterday, I deleted the node_modules directory and executed npm install. Since then, my code has encountered an error, and I am seeking assistance to resolve this issue. Any guidance or support would be greatly appreciated.

image

Steps to reproduce

do npm i

Expected behavior

it should show pdf

Actual behavior

it is giving error

Additional information

No response

Environment

  • Browser (if applicable):
  • React-PDF version:
  • React version:
  • Webpack version (if applicable):

I think this is an issue with @react-pdf/textkit

The version you are using is incorrect, please validate my assertion that you are using @react-pdf/textkit@4.4.0
(Note: You may need to go into the node_modules folder to explicitly look at the dependency)

@jd-carroll I have found this @react-pdf/textkit in my package-lock.json and it is correct i think 4.4.0. it is internal dependency of react-pdf.

image

Do you have any workaround for this. like what can i do to fix this error temporary?

It looks like you confused React-PDF with @react-pdf/renderer. Please file an issue in their repo instead.