I'm getting the following error when trying to run a React project using TypeScript.
This occurred after upgrading from apollo 1.9.2 to 2.1.2.
This is strange, because it's complaining about what look to be different packages, but something about this version trips it up.
Please let me know if any other information would be helpful. Thank you.
Error:
Failed to compile.
./node_modules/react-apollo/react-apollo.browser.umd.js
Module not found: Can't resolve 'apollo-client' in 'project\node_modules\react-apollo'
@mwarger that is bizarre, do you have a repo where I could reproduce this?
I do not, but I can try to make one.
@mwarger Did you resolve this? I'm getting the same error
@fgiarritiello I have not, but I have started a repo for reproduction. Give me a couple days and I will follow-up.
To be clear - downgrading apollo back to 1.9.2 fixed the issue for me temporarily.
I actually just fixed the problem. In my case when I ran npm outdated it was showing that 2.3.2 was available, but looking at the versions here on github the last version available is 2.3.2-beta.3. After I installed 2.3.2-beta.3 the error went away. So my guess is that 2.3.2 is not an actual valid version to install.
Is that apollo? I think we may be talking about different packages. I was referring to https://www.npmjs.com/package/apollo.
react-apollo
Any update?
Seems not a bug. Following this https://s3.amazonaws.com/apollo-docs-1.x/initialization.html#installation
will cause the error on newer version of apollo. (v2)
Is this still an issue?
No.