Skip to content
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 Mesh source incompatible with node versions above 15.0 and breaks when downgraded to 14.0.0 #1543

Closed
tvvignesh opened this issue Feb 5, 2021 · 11 comments

Comments

@tvvignesh
Copy link
Contributor

Hi. I tried cloning the repo and running a yarn install which failed cause I was running node v15.6.0 (latest is 15.8.0)

6

I guess the source supports only versions <15.0 because of federation. Thought of letting you know.

But when I tried downgrading node version to 14.0.0 I got a new error as below:

7

I guess that is because the URL it refers to: https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz is denied due to which the installation fails.

Thanks.

CC: @Urigo

@ardatan
Copy link
Owner

ardatan commented Feb 5, 2021

@tvvignesh We had nothing to do for federation package :/ So we use yarn --ignore-engines while installing dependencies.

CI passes for both 10 and 15. I think it's supposed to pass for 14. Check this;
https://github.com/Urigo/graphql-mesh/blob/master/.github/workflows/tests.yml#L72

When you switch Node versions, sometimes you might need to reinstall node_modules after removed it manually.

@tvvignesh
Copy link
Contributor Author

@ardatan Yup. I understand what you are saying 😅

Btw, tried it with--ignore-engines with both v15.6.0 and v14.0.0 and it fails since the URL is denied as mentioned above. So the CI might also fail (not sure).

Btw, I did delete the node_modules folder.

@tvvignesh
Copy link
Contributor Author

tvvignesh commented Feb 5, 2021

Similar issue reported here: TryGhost/node-sqlite3#758

And here: TryGhost/node-sqlite3#947

@ardatan
Copy link
Owner

ardatan commented Feb 5, 2021

@tvvignesh Those issues are pretty old but still this is really interesting. I tried on 14.0.0 and 15.6.0 locally (it takes sometime to build sqlite ) on my Ubuntu machine, it worked. And CI uses the latest node version and it can install deps with no errors;
https://github.com/Urigo/graphql-mesh/runs/1837583475

On my local, I also see those warnings but if it cannot access the precompiled binaries it tries to build those by itself. You can see in your log 403 is considered as WARN not ERR. So it fails because somehow node-gyp cannot compile the source code. Could you share the entire log?

@tvvignesh
Copy link
Contributor Author

@ardatan Sure. Here you go:

vignesh@tc-work-1:/data/tc/projects/theguild/graphql-mesh$ yarn install
yarn install v1.22.10
[1/4] Resolving packages...
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@15.4.0"
warning Resolution field "graphql@15.5.0" is incompatible with requested version "graphql@^14.5.3"
[2/4] Fetching packages...
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.2.1: The platform "linux" is incompatible with this module.
info "fsevents@2.2.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.3.1: The platform "linux" is incompatible with this module.
info "fsevents@2.3.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "bob-the-bundler > @rollup/plugin-node-resolve@7.1.1" has incorrect peer dependency "rollup@^1.20.0".
warning " > @graphql-mesh/mongoose@0.6.39" has unmet peer dependency "mongoose@*".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/cli > @graphql-codegen/typescript-generic-sdk@1.17.9" has unmet peer dependency "graphql-tag@^2.0.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/config > graphql-subscriptions@1.1.0" has incorrect peer dependency "graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 || ^14.0.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/soap > soap-graphql@0.1.1" has incorrect peer dependency "graphql@~0.10.0 | ~0.11.0 | ~0.12.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/soap > soap-graphql@0.1.1" has incorrect peer dependency "soap@~0.23.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > openapi-react-weatherbit > @testing-library/user-event@12.2.2" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > thrift-calculator > @creditkarma/thrift-server-express@0.16.1" has unmet peer dependency "@types/express@>=4.0.0 <5.0.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/postgraphile > postgraphile > graphile-utils@4.11.2" has unmet peer dependency "graphile-build@^4.5.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/postgraphile > postgraphile > graphile-utils@4.11.2" has unmet peer dependency "graphile-build-pg@^4.5.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/soap > soap-graphql > graphql-iso-date@3.3.0" has incorrect peer dependency "graphql@^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/tuql > tuql > express-graphql@0.9.0" has incorrect peer dependency "graphql@^14.4.1".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/tuql > tuql > graphql-relay@0.6.0" has incorrect peer dependency "graphql@^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/tuql > tuql > graphql-sequelize@9.4.0" has incorrect peer dependency "graphql@^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/website > @docusaurus/core > postcss-loader@4.2.0" has unmet peer dependency "postcss@^7.0.0 || ^8.0.1".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/neo4j > neo4j-graphql-js > graphql-tools > @graphql-tools/links@7.0.3" has unmet peer dependency "@apollo/client@~3.2.5".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/postgraphile > postgraphile-core > graphile-build-pg > graphql-iso-date@3.6.1" has incorrect peer dependency "graphql@^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0-b || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/merger-federation > @apollo/gateway > apollo-server-core > graphql-upload@8.1.0" has incorrect peer dependency "graphql@0.13.1 - 14".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/website > @docusaurus/preset-classic > @docusaurus/theme-search-algolia > @docsearch/react@3.0.0-alpha.32" has unmet peer dependency "@types/react@>= 16.8.0 < 18.0.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/neo4j > neo4j-graphql-js > graphql-tools > @graphql-tools/links > apollo-upload-client@14.1.2" has unmet peer dependency "subscriptions-transport-ws@^0.9.0".
warning "workspace-aggregator-08c0739f-f424-40d9-857f-53f1cde02a58 > @graphql-mesh/website > @docusaurus/preset-classic > @docusaurus/theme-search-algolia > @docsearch/react > @algolia/autocomplete-preset-algolia@1.0.0-alpha.37" has unmet peer dependency "@algolia/client-search@^4.5.1".
[4/4] Building fresh packages...
[-/13] ⠁ waiting...
[11/13] ⠁ core-js-pure
[12/13] ⠁ ejs
[10/13] ⠁ sharp
error /data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.11.0
node-pre-gyp info using node@14.0.0 | linux | x64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for "/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" (not found)
node-pre-gyp http GET https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz
node-pre-gyp http 403 https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz
node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and node@14.0.0 (node-v83 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp http 403 status code downloading tarball https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/node-v83-linux-x64.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@14.0.0 | linux | x64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp info using node@14.0.0 | linux | x64
gyp info find Python using Python version 3.8.5 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v14.0.0/node-v14.0.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v14.0.0/node-v14.0.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v14.0.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v14.0.0/SHASUMS256.txt
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/home/vignesh/.nvm/versions/node/v14.0.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/vignesh/.nvm/versions/node/v14.0.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/vignesh/.cache/node-gyp/14.0.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/vignesh/.cache/node-gyp/14.0.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/vignesh/.nvm/versions/node/v14.0.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/vignesh/.cache/node-gyp/14.0.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@5.1.0
gyp make: Entering directory '/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3/build'
  ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
info/bin/sh: 1: python: not found
 using node@14.0.0 | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: *** [deps/action_before_build.target.mk:13: Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127
make: Leaving directory '/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/vignesh/.nvm/versions/node/v14.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.4.0-1036-gcp
gyp ERR! command "/home/vignesh/.nvm/versions/node/v14.0.0/bin/node" "/home/vignesh/.nvm/versions/node/v14.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node" "--module_name=node_sqlite3" "--module_path=/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3/lib/binding/node-v83-linux-x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3
gyp ERR! node -v v14.0.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/home/vignesh/.nvm/versions/node/v14.0.0/bin/node /home/vignesh/.nvm/versions/node/v14.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3/lib/binding/node-v83-linux-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3/lib/binding/node-v83-linux-x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/data/tc/projects/theguild/graphql-mesh/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1051:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
node-pre-gyp ERR! System Linux 5.4.0-1036-gcp
node-pre-gyp ERR! command "/home/vignesh/.nvm/versions/node/v14.0.0/bin/node" "/data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /data/tc/projects/theguild/graphql-mesh/node_modules/sqlite3
node-pre-gyp ERR! node -v v14.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok

@ardatan
Copy link
Owner

ardatan commented Feb 5, 2021

It seems that line breaks the script;
info/bin/sh: 1: python: not found
Do you have python installed on your environment?

@tvvignesh
Copy link
Contributor Author

OOPS! Didn't see that. I don't have python. Let me try this again after adding python.

@tvvignesh
Copy link
Contributor Author

@ardatan Installed python2.6 and tried it again and it works 👍 We may need to add this to the contrib docs though since seems like mapbox do not have all prebuilt binaries.

Btw, Python2 has already crossed EOL: https://www.python.org/doc/sunset-python-2/ And this asks for python2 to build the source. Is it fine 🤔

@tvvignesh
Copy link
Contributor Author

@ardatan Unrelated to this issue, but I got this error when trying to start the server after generating the API Docs with yarn build:api-docs

image

Anything I can do on my end to fix it? Without the sidebars file, the website doesn't run anyways.

@ardatan
Copy link
Owner

ardatan commented Feb 9, 2021

@tvvignesh I had that error before so I fixed it.
Did you get this change?
3101cbf#diff-8c5967fd8486f34493710cc39b240aad46536cf4ee421ffd0479e6542db03e36
After this commit, that error should be fixed.

@tvvignesh
Copy link
Contributor Author

Didn't update my fork. Will do it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants