Skip to content

Commit b083776

Browse files
committed
Install gyp before rest
1 parent 04aa11e commit b083776

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.evergreen/install-npm-deps.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
set -e
22
set -x
33

4-
npm ci --verbose
5-
6-
echo "MONOGDB_DRIVER_VERSION_OVERRIDE:$MONOGDB_DRIVER_VERSION_OVERRIDE"
7-
8-
echo "DISTRO ID: $DISTRO_ID"
9-
# Needed to ensure Python 3.6 support which is the oldest one that's available out-of-the-box on the rhel70 hosts.
4+
echo "DISTRO ID: ${DISTRO_ID}"
105
if [[ "${DISTRO_ID}" =~ ^(rhel) ]]; then
11-
echo "RUNNING NODE-GYP@9"
12-
npm install node-gyp@9 --verbose --force
6+
export REPLACE_PACKAGE="node-gyp:9.0.0"
7+
npm run replace-package
8+
# force because of issues with peer deps and semver pre-releases,
9+
# install rather than ci because `npm ci` can only install packages when your
10+
# package.json and package-lock.json or npm-shrinkwrap.json are in sync.
11+
# NOTE: this won't work on some more exotic platforms because not every dep
12+
# can be installed on them. That's why we only run on linux x64 platforms when
13+
# we set MONOGDB_DRIVER_VERSION_OVERRIDE=nightly in CI
14+
npm ci --verbose --force
15+
else
16+
npm ci --verbose
1317
fi
1418

19+
echo "MONOGDB_DRIVER_VERSION_OVERRIDE:$MONOGDB_DRIVER_VERSION_OVERRIDE"
20+
1521
# if MONOGDB_DRIVER_VERSION_OVERRIDE is set, then we want to replace the package version
1622
if [[ -n "$MONOGDB_DRIVER_VERSION_OVERRIDE" ]]; then
1723
export REPLACE_PACKAGE="mongodb:$MONOGDB_DRIVER_VERSION_OVERRIDE"

0 commit comments

Comments
 (0)