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

document is not defined #99

Closed
nc opened this issue Oct 9, 2015 · 4 comments
Closed

document is not defined #99

nc opened this issue Oct 9, 2015 · 4 comments

Comments

@nc
Copy link

nc commented Oct 9, 2015

Fresh react-native 0.12 project. Add server and running off master a58a670

Uncaught Error: Uncaught ReferenceError: document is not definedmessageHandlers.executeApplicationScript @ debuggerWorker.js:18onmessage @ debuggerWorker.js:42

@nc
Copy link
Author

nc commented Oct 9, 2015

Traced to var scriptElements = document.getElementsByTagName("script");

@auser
Copy link

auser commented Oct 10, 2015

Ditto

@elliottsj
Copy link
Collaborator

I've traced the error to webpack-dev-server/client/index.js#L4, which is included as 'webpack-dev-server/client?http://localhost:8082' in the webpack config.

I think I know how to get HMR working with the new web worker in RN 0.12 (at least in a hacky way). More info soon 😄

@elliottsj
Copy link
Collaborator

See #103 for the full explanation & temporary fix

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