paleobot / pbot-dev

Codebase and initial design documents for pbot client
MIT License
2 stars 2 forks source link

Clean install of api is a nightmare due to neo4j-graphql-js #302

Open NoisyFlowers opened 1 week ago

NoisyFlowers commented 1 week ago

I'm getting multiple versions of graphql library after install. This shouldn't happen, as I have specified an override in the package.json, which should force all package sub-installations to use the one I explicitly install. This is not working.

Running

find node_modules -name graphql

indicates there are two versions under neo4j-graphql-js.

Here is the content of neo4j-graphql-js/node_modules on prod after npm install:

ansi-styles           apollo-utilities  debug                    graphql-ws                  supports-color
@apollo               chalk             graphql                  has-flag                    uuid
apollo-link           color-convert     graphql-auth-directives  ms                          value-or-promise
apollo-server-errors  color-name        @graphql-tools           node-fetch
apollo-upload-client  dataloader        graphql-tools            subscriptions-transport-ws

Here is the content of neo4j-graphql-js/node_modules on dev and local (and prod before a clean install):

apollo-server-errors  debug  ms

No idea why these are so different. The first matches the package.json. I tried deleting everything to make it match the dev content, but then I get an error because it can't find graphql-auth-directives. No idea why I don't get this error on dev and local (and prod before this install). It's quite perplexing.

I manually deleted the two errant instances of graphql. Seems to be working, but this is a f'ed up way to run a railroad. We need to find a better way to deploy neo4j-graphql-js.