graphql-inspector
graphql-inspector copied to clipboard
Docker image throwing unknown module exception
Issue workflow progress
Progress of the issue based on the Contributor Workflow
- [ ] 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
Make sure to fork this template and run
yarn generatein the terminal.Please make sure the Codegen and plugins version under
package.jsonmatches yours.
- [ ] 2. A failing test has been provided
- [ ] 3. A local solution has been provided
- [ ] 4. A pull request is pending review
Describe the bug
Running the following command with the latest docker image version
graphql-inspector diff https://app.launchnotes.io/graphql frontend/src/data/schema.graphql
Results in the following exception:
node:internal/modules/cjs/loader:936
throw err;
^
Error: Cannot find module 'tslib'
Require stack:
- /usr/local/share/graphql-inspector/cli/dist/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:[27](https://gitlab.com/shiny-planes/the-goat/-/jobs/2729717131#L27))
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/usr/local/share/graphql-inspector/cli/dist/index.js:6:15)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:[32](https://gitlab.com/shiny-planes/the-goat/-/jobs/2729717131#L32))
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/usr/local/share/graphql-inspector/cli/dist/index.js' ]
}
To Reproduce Steps to reproduce the behavior:
graphql-inspector diff https://app.launchnotes.io/graphql frontend/src/data/schema.graphql
Expected behavior
I expect the diff to run successfully.
Environment:
- Latest docker image
Additional context
We have been running this in CI for about six months with no issue until the recent release pushed a new version to docker. Since we're using the latest tag, builds after the release began to fail.
A single command to reproduce the same error is:
docker run --pull=always kamilkisiela/graphql-inspector:latest graphql-inspector
I already described this problem in https://github.com/kamilkisiela/graphql-inspector/pull/2035. The changes from there were merged in https://github.com/kamilkisiela/graphql-inspector/pull/2139 - unfortunately without fixing the outstanding issue with it.
I am not sure what is necessary to fix this, but I reckon that the build steps described in Dockerfile will have to be extended to include dependencies.
Started breaking in our CI pipeline too :(
Can provide the older version v3.2.0 to docker hub to skip the failure from the v3.3.0 ?
Yet unofficial, I pushed a modified Docker image based on v3.2.0 (old and unbroken version).
Docker Hub: https://hub.docker.com/r/ayumitamai97/graphql-inspector/tags Changes: https://github.com/ayumitamai97/graphql-inspector/releases/tag/v3.2.0-modified
Example:
docker run --pull=always --rm -v $PWD:/app \
ayumitamai97/graphql-inspector:3.2.0-modified graphql-inspector introspect your_schema.graphql
Just a temporary solution :)
Subscribing since I've run into the same issue.
@spawnia @kamilkisiela Hi. I fixed this problem in this PR https://github.com/kamilkisiela/graphql-inspector/pull/2144. Could you please review it? Thanks :)
@kamilkisiela Would it be possible to tag a new version so we can use the tagged image? That would be amazing 🙏
The fixed version is currently only available under the tag master:
