Skip to content

Fix for RN 0.12#93

Merged
elliottsj merged 5 commits intomjohnston:masterfrom
elliottsj:rn-0.12
Oct 9, 2015
Merged

Fix for RN 0.12#93
elliottsj merged 5 commits intomjohnston:masterfrom
elliottsj:rn-0.12

Conversation

@elliottsj
Copy link
Collaborator

Fixes the problem where the RN packager would throw:

Error: Error validating module options: child "platform" fails because ["platform" is required]
    at /Users/spencerelliott/Dev/elliottsj/react-native-webpack-server/Examples/BabelES6/node_modules/react-native/packager/react-packager/src/lib/declareOpts.js:60:13
    at /Users/spencerelliott/Dev/elliottsj/react-native-webpack-server/Examples/BabelES6/node_modules/react-native/packager/react-packager/src/Server/index.js:161:20
    at tryCallOne (/Users/spencerelliott/Dev/elliottsj/react-native-webpack-server/Examples/BabelES6/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
    at /Users/spencerelliott/Dev/elliottsj/react-native-webpack-server/Examples/BabelES6/node_modules/react-native/node_modules/promise/lib/core.js:103:15
    at flush (/Users/spencerelliott/Dev/elliottsj/react-native-webpack-server/Examples/BabelES6/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
    at doNTCallback0 (node.js:407:9)
    at process._tickCallback (node.js:336:13)

Currently, hot module replacement is not working due to a recent change where the Chrome debugger now runs the app bundle inside a web worker: facebook/react-native#1632

@elliottsj elliottsj force-pushed the rn-0.12 branch 2 times, most recently from 5a8dfe2 to 97d9610 Compare October 9, 2015 01:40
@elliottsj elliottsj merged commit 97d9610 into mjohnston:master Oct 9, 2015
@elliottsj elliottsj deleted the rn-0.12 branch October 9, 2015 01:44
@elliottsj elliottsj mentioned this pull request Oct 9, 2015
@nevir
Copy link
Contributor

nevir commented Oct 9, 2015

Out of curiosity, what is missing from the web worker's environment that is required for HMR?

@elliottsj
Copy link
Collaborator Author

In the webpack config, we depend on webpack-dev-server/client.js to automatically update modules, but it depends on document.getElementsByTagName("script");, which throws an error in a web worker since there's no document. I haven't had the chance to investigate further than that though.

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

Successfully merging this pull request may close these issues.

2 participants