Skip to content

webpack 2 sever rendering window is not defined #9888

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

Closed
IzaGz opened this issue Jul 10, 2018 · 3 comments
Closed

webpack 2 sever rendering window is not defined #9888

IzaGz opened this issue Jul 10, 2018 · 3 comments

Comments

@IzaGz
Copy link

IzaGz commented Jul 10, 2018

i am using webpack 2.
constantly see error on server sider rendering
UnhandledPromiseRejectionWarning: ReferenceError: window is not defined
how can i import pdfjs-dist dynamicly, when window defined?

@Snuffleupagus
Copy link
Collaborator

UnhandledPromiseRejectionWarning: ReferenceError: window is not defined

One instance of such errors were fixed in dcc7f33; but considering that all of the information requested in https://github.com/mozilla/pdf.js/blob/master/.github/ISSUE_TEMPLATE.md is currently missing, that's just a guess at what the actual problem might be.

@timvandermeij
Copy link
Contributor

The information from the issue template is indeed missing, making this issue not actionable. Note that we switched to Webpack 4 and fixed some of these issues in newer versions, so please consider upgrading.

@IzaGz
Copy link
Author

IzaGz commented Jul 18, 2018

@timvandermeij i also switched to webpack 4.
I got this error when server rendering with node-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants