From 6fbb99c8b6b07e02d79fb4f86b3526c35ea99de0 Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 30 Nov 2023 15:40:55 +0100 Subject: [PATCH] node: use older version of npm to match older version of node --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9212edb..f502222 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,10 +28,18 @@ VOLUME "/data" RUN git config --global 'user.email' 'team@pelias.io' RUN git config --global 'user.name' 'Pelias Docker' +# # +# ENV NAVE_CONFIG="--without-npm" + # install nodejs ENV NODE_VERSION='16.20.1' RUN git clone 'https://github.com/isaacs/nave.git' /code/nave && /code/nave/nave.sh 'usemain' "${NODE_VERSION}" && rm -rf ~/.nave /code/nave +# node version is so old it requires an older version of npm +# https://stackoverflow.com/a/77024158 +RUN npm version +RUN npm i npm@9 -g + # add global install dir to $NODE_PATH ENV NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"