Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

strapi/base:14: Graphql plugin with 14.17 dependency; strapi base uses 14.16 #329

Open
kyuumeitai opened this issue Jan 26, 2022 · 5 comments

Comments

@kyuumeitai
Copy link

If you try to use docker/base in your Dockerfile and installing Graphql plugin on docker-entrypoint.sh after, you'll see the graphql-upload dependency demands 14.17.0 https://github.com/jaydenseric/graphql-upload/blob/master/package.json#L45

I ended removing nodejs link on my docker-entrypoint.sh and installing manually with curl similar to strapi/base does:

rm -rf /usr/local/bin/nodejs

/bin/sh -c ARCH= && dpkgArch="$(dpkg --print-architecture)"   && case "${dpkgArch##*-}" in     amd64) ARCH='x64';;     ppc64el) ARCH='ppc64le';;     s390x) ARCH='s390x';;     arm64) ARCH='arm64';;     armhf) ARCH='armv7l';;     i386) ARCH='x86';;     *) echo "unsupported architecture"; exit 1 ;;   esac   && set -ex   && curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH.tar.xz" && tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner  && rm "node-v$NODE_VERSION-linux-$ARCH.tar.xz"  && ln -s /usr/local/bin/node /usr/local/bin/nodejs   && node --version   && npm --version

That way you can install strapi-plugin-graphql without further issues.

@microadam
Copy link

@kyuumeitai having the same issue. Could you please provide your Dockerfile / link to whatever it is you are referencing by installing manually with curl similar to strapi/base does? As I can't find anything that does something like your example

@kyuumeitai
Copy link
Author

kyuumeitai commented Feb 8, 2022

Hi @microadam !
I made an example in the following repository based on my solution, I hope it helps you.

https://github.com/kyuumeitai/strapi-docker-node-issue

@microadam
Copy link

Awesome! Thank you :)

@nguyenlamlll
Copy link

Thank you a lot for your hints. However, that part /bin/sh -c ARCH= && dpkgArch="$(dpkg --print-architecture)" ... looks scary to me (I am no Linux expert). May you please explain what it is, or maybe you can just throw me a doc or something to read? Thanks!

@KingProphecyhk
Copy link

Same problem here, strapi need to update the docker image to use node 16

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

No branches or pull requests

4 participants