Meteor-Community-Packages / check-npm-versions

Enforces "peer" npm dependencies in Meteor 1.3+ Atmosphere packages.
MIT License
11 stars 10 forks source link

Client error message #9

Closed lorensr closed 4 years ago

lorensr commented 8 years ago

It currently always says X is not installed:

check-npm-versions.js:28 Uncaught Error: apollo-client@^0.3.12 not installed.

This may be misleading, in the case that you have installed with npm i, but the client doesn't see it. Consider:

  1. meteor add apollo
  2. npm i --save apollo-client: error on client
  3. add import { meteorClientConfig } from 'meteor/apollo'; to client file: error on client (is this a bug? the file that defines meteorClientConfig imports from apollo-client)
  4. add import { ApolloClient } from 'apollo-client'; to client file: error goes away

Perhaps could say X is either not installed or has not been imported on the client

copleykj commented 4 years ago

is this still an issue?

copleykj commented 4 years ago

This seems to be like this package should only run on the server to report the issue.

copleykj commented 4 years ago

Yes, for future reference, checking npm versions should be done on the server even if the npm module code is needed on the client.