Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Why apollo hooks need the react-dom dependencie? #3115

Closed
isacjunior opened this issue Jun 14, 2019 · 1 comment
Closed

Why apollo hooks need the react-dom dependencie? #3115

isacjunior opened this issue Jun 14, 2019 · 1 comment
Assignees

Comments

@isacjunior
Copy link

I started using @apollo/react-hooks for testing hooks with apollo in react-native and when starting application, I have a warning about react-dom dependency. The question is, I need react-dom dependence on react-native?

Loading dependency graph, done.
error: bundling failed: Error: Unable to resolve module `react-dom/server` from `/Users/isac/Projects/React/apollo-hooks/node_modules/@apollo/react-hooks/lib/react-hooks.cjs.js`: Module `react-dom/server` does not exist in the Haste module map

Version

"@apollo/react-hooks": "^0.1.0-beta.7",
"apollo-cache-inmemory": "^1.6.0",
"apollo-client": "^2.6.0",
"apollo-link-http": "^1.5.14",
"graphql": "^14.3.1",
"graphql-tag": "^2.10.1",
@jasonpaulos
Copy link
Contributor

jasonpaulos commented Jun 14, 2019

Thanks for the bug report @isacjunior. This bug should be fixed by 6069932, which should make its way to the next release. In the meantime, you could manually add

"react-native": {
  "react-dom/server": false
}

to @apollo/react-hooks's package.json in your node_modules folder.

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

No branches or pull requests

2 participants