-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
graphql-lsp lacks dependencies and fails silently, whether installed globally with npm/yarn #3214
Comments
when rebuilding the docker image by installing dependencies with node:internal/modules/cjs/loader:1078
throw err;
^
Error: Cannot find module 'graphql'
Require stack:
- /usr/local/share/.config/yarn/global/node_modules/graphql-language-service-cli/dist/client.js
- /usr/local/share/.config/yarn/global/node_modules/graphql-language-service-cli/dist/cli.js
- /usr/local/share/.config/yarn/global/node_modules/graphql-language-service-cli/bin/graphql.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (/usr/local/share/.config/yarn/global/node_modules/graphql-language-service-cli/dist/client.js:6:19)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/local/share/.config/yarn/global/node_modules/graphql-language-service-cli/dist/client.js',
'/usr/local/share/.config/yarn/global/node_modules/graphql-language-service-cli/dist/cli.js',
'/usr/local/share/.config/yarn/global/node_modules/graphql-language-service-cli/bin/graphql.js'
]
} However, running
|
graphql is a peer dependency, so if you are using yarn, it is not installed automatically. this cli will not give you graphiql, it gives you an lsp server that uses RPC to use with IDEs |
@dcunited001 I looked closely at the error, and saw the issue is with
|
Thanks for getting back with me. I will give it a try soon. |
@dcunited001 the reason we do this is because companies can be on many graphql versions, and may have server libraries that match legacy or modern versions of the reference implementation for the most part though, many are on the latest. in that case, I hope to soon add an ncc bundle to releases that would make it a bundled native package that wouldnt even require installing node |
Current Behavior (if applicable)
installing with
npm install -g graphql-language-service-cli vscode-language-server
doesn't seem to satisfy dependences. the binary fails, but gives no error whatsoever.I understand that I could just run
graphiql
and I may do this, but can I do that from a docker container? The reason I don't is because I know how my editor handles secrets and I don't want to know how this application does that. I'll be using it for the Github API and maybe some other API's.I do not want to have to have nodejs on my system, except in a docker container. This is because I use two linux distributions, one of them being Guix, so when I depend on X scripting language, I have to configure it twice.
Dockerfile
initializing the container with:
and any command containing
graphql-lsp server
fails without an error in the Docker container and on my Arch system as well.Desired Behavior
strace indicates the application fails because it's trying to find dependencies that don't seem to be specified in the graphql-language-service-cli:
A little difficult to tell, since it tries to find a lot of files (and eventually succeeds on some of them), but that's the last line before the process begins failing.
The text was updated successfully, but these errors were encountered: