-
-
Notifications
You must be signed in to change notification settings - Fork 902
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 #164
Comments
Hello,
then the paths to any files not directly loaded by index.html might get screwed. I suggest you, for starters, to output everything to root folder. |
Regarding the path to sample.pdf, React-PDF won't even try to load it if it failed to load the worker file. But I think the correct path would be |
Hello, wojtekmaj Thank you very much! Have a nice day! |
You're welcome! Glad to help. I assume you may have issues with output section of Webpack config. Perhaps it's missing publicPath parameter? I suppose you need to specify that one if out want to output js files to a different directory than root. |
@wojtekmaj Same problem here, would you please let me know how can I change my configure file? Beginner of webpack.
|
@weasteam, have you read about publicPath parameter? If not, check it out and if you still have issue we will figure something out. Mind you, publicPath should go to |
@wojtekmaj
Also, I noticed the example code in documentation is never correct for me:
I have to use this code
|
@weasteam What you see on README.md on this repo currently is the bleeding edge version on master branch. If you want to see documentation for specific release, you should use the following. |
For those who might still have the problem, I resolved it via: Copy
|
Mind you, that's how you do it in the newest React-PDF, using newest PDF.js, If I recall correctly on 3.x you'd need to set |
Duplicate of #97 |
Hi, guys, I am trying to run the sample file, I got an Error :
pdf.worker.js?./node_modules/worker-loader/dist/cjs.js:2 GET http://localhost:8005/54780f3c4e0c00bc5d4d.worker.js 404 (Not Found)
so le PDF can't load
Here is a screen shot:
Here is my project directory and code :
Here is my webpack.config.js :
I am very beginner, if you need more information to locate the problem, please let me know, thank you !
The text was updated successfully, but these errors were encountered: