Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<hash>.worker.js returns Error 404 #245

Closed
Vanals opened this issue Jul 20, 2018 · 4 comments
Closed

<hash>.worker.js returns Error 404 #245

Vanals opened this issue Jul 20, 2018 · 4 comments
Assignees
Labels
question Further information is requested

Comments

@Vanals
Copy link

Vanals commented Jul 20, 2018

Description
Hi, I did set up react-pdf and it works perfectly, I did followed the instructions. But in development once I open a page that render a pdf file i get an error 404. Saying that a request for a path "/pdf.worker.js" has been done ( not by me volontary) and an error 404 is returned.

pdf.worker.js error

Anyone knows why this error and how to fix it? thanks
I built the app using create-react-app, react router and express.js

Steps to reproduce
Steps to reproduce the behavior:
You can see it live here: http://www.lostudenteim.it/materie-infermieristica/file-fisiologia-umana

Environment

  • Browser: Chrome version [67.0.3396.99]
  • React-PDF version [e.g 3.0.5]:
    "react": "^16.3.2",
    "express": "^4.16.3",
@wojtekmaj
Copy link
Owner

Seeing that pdf.worker.js request is done suggests me you're using default entry file (import ... from 'react-pdf'). That means you need to take care of copying pdf.worker.js by yourself. You have more options available - automatic config for Webpack and Parcel.

@wojtekmaj wojtekmaj self-assigned this Jul 20, 2018
@wojtekmaj wojtekmaj added the question Further information is requested label Jul 20, 2018
@Vanals
Copy link
Author

Vanals commented Jul 20, 2018

@wojtekmaj Yes you are right I am importing manually.
IF I want to do it by my self:

  1. Where should I copy it?
  2. What should in it?
  3. What is it for?

@Vanals
Copy link
Author

Vanals commented Jul 25, 2018

thanks, sorted :)

@Vanals Vanals closed this as completed Jul 25, 2018
@wojtekmaj wojtekmaj mentioned this issue Aug 14, 2018
3 tasks
@wojtekmaj wojtekmaj changed the title http://xxx/pdf.worker.js not found ERROR 404 <hash>.worker.js returns Error 404 Dec 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants