apollographql / meteor-integration

šŸš€ meteor add apollo
http://dev.apollodata.com/core/meteor.html
108 stars 45 forks source link

Installation / version problem #76

Closed csillag closed 7 years ago

csillag commented 7 years ago

Round 1

Following the instructions here, I added the Apollo packages to my Meteor (1.4.3.1) app with these commands:

meteor add apollo
meteor npm install --save apollo-client graphql-server-express express graphql graphql-tools body-parser

However, this resulted in an invalid combination of versions:

WARNING: npm peer requirements (for apollo) not installed:
  - apollo-server@^0.1.1 not installed.
  - http-proxy-middleware@^0.15.0 not installed.

This is caused by the fact that for some reason, I got Apollo v0.0.1, which depends on a completely different set of NPM packages, not the one I installed (following the instructions).

Round 2

Since according to the relevant Atmosphere page, the latest version of the Apollo Meteor package is 0.3.1, I updated it manually:

meteor add apollo@0.3.1

With this, it got closer to working, but still not there. Now I get these messages:

WARNING: npm peer requirements (for apollo) not installed:
  - graphql-server-express@0.6.0 installed, graphql-server-express@^0.5.0 needed
  - graphql@0.9.1 installed, graphql@^0.7.0 || ^0.8.0 needed
  - graphql-tools@0.10.0 installed, graphql-tools@^0.9.0 needed

So, now the peer dependencies are there, but it looks like the Meteor package is lagging behind the NPM versions. Is there a chance that it will be updated soon?

In the meantime, can I ignore these warnings, and just use the package anyway? (I am new to Apollo, so I would like to avoid having to figure out whether any problems I hit originate in version incompatibilities...)

Thanks.

csillag commented 7 years ago

BTW, manually downgrading the mentioned NPM packages works around the problem, for now... but then we miss out on the latest releast of the graphql libraries.

xavxyz commented 7 years ago

Hey @csillag!

Thanks for opening an issue about that: it's pretty weird that you got v0.0.1 from Atmosphere šŸ˜Ø

The v0.4.0 is on its way to Atmosphere and will solve this warning, which doesn't block anything. I'd advice you to stay on the latest NPM versions šŸ‘

lorensr commented 7 years ago

Thanks Kristof, released v0.4.0 with new peer dep versions

alanchrt commented 7 years ago

I also got v0.0.1 from a basic meteor add apollo tonight.

$ meteor add apollo
Changes to your project's package version selections:
apollo  added, version 0.0.1
apollo: Add Apollo to your Meteor app šŸš€

Resulting in the same:

WARNING: npm peer requirements (for apollo) not installed:
  - apollo-server@^0.1.1 not installed.
  - http-proxy-middleware@^0.15.0 not installed.
$ meteor --version
Meteor 1.4.3.2

Just a basic todos codebase, at this commit: https://github.com/alanctkc/meteor-simple-todos/tree/13ab3ceee1dcf0cab2897b947e8ef83bc8ccbbcb

Wonder if there's some bizarre caching going on somewhere or something.

alanchrt commented 7 years ago

Specifying the version seemed to make meteor happy on my machine:

$ meteor add apollo@0.6.0
Changes to your project's package version selections:
apollo                       added, version 0.6.0
tmeasday:check-npm-versions  upgraded from 0.2.0 to 0.3.1
apollo:  šŸš€ Add Apollo to your Meteor app

Removing and re-adding the package ended up keeping me on 0.6.0, however, even though every previous add was on 0.0.1:

$ mr apollo
Changes to your project's package version selections:
apollo  removed from your project
apollo: removed dependency

$ ma apollo
Changes to your project's package version selections:
apollo  added, version 0.6.0
apollo:  šŸš€ Add Apollo to your Meteor app

I installed meteor for the first time a week ago, so there's no chance I had something stale from June (v0.0.1).

Wondering if this is a broader atmosphere issue, but I hadn't noticed it in any of the other tutorial packages (possibly things just aren't changing as rapidly on those, however, enough to break).

lorensr commented 7 years ago

I don't know why that is, something must be different in your environment? Installs latest for me, on meteor 1.4.3.2:

image

alanchrt commented 7 years ago

Yeah, really no clue either! Figured I'd drop my comments in case someone else hits the same snag. I can't imagine how it'd be directly related to the apollo package itself except that it's the only one I had an issue with, and @csillag reported the same earlier. Wish I could provide more details on the trail, but hopefully we were outliers, or a temporary issue caused it.

Fwiw I'm on Arch Linux (manjaro).. probably not super relevant unless the Meteor install treats the platforms differently path/caching-wise:

$ uname -a
Linux t460s 4.4.45-1-MANJARO #1 SMP PREEMPT Thu Jan 26 11:32:11 UTC 2017 x86_64 GNU/Linux

Meteor was installed with the recommended curl command.

:man_shrugging: Probably not worth chasing unless others consistently report it.

pozylon commented 7 years ago

Happened to me right now, after meteor update --all-packages, all fine