"Cannot find package '@graphql-mesh/transport-rest'" when running gateway package container #235
-
DescriptionGetting the following error running any of the 1.5.x gateway package containers when trying to load transport "rest":
Can the Additional ContextI am defining a subgraph from an OpenAPI schema using The package is installed and is available in the node_modules directory, but it is not part of the container image. Everything works as expected when running locally, but fails when running in Docker (locally and deployed). If I try to import the package directly from the node_modules directory, I then encounter the following duplicate graphql modules error:
Environment
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Not all transports are included in the docker image. You have to install it yourself. Please check the "Extend Docker Image" documentation on the how-to. Your Dockerfile should roughly be: FROM ghcr.io/graphql-hive/gateway
RUN npm i @graphql-mesh/transport-rest |
Beta Was this translation helpful? Give feedback.
Not all transports are included in the docker image. You have to install it yourself. Please check the "Extend Docker Image" documentation on the how-to.
Your Dockerfile should roughly be: