diff --git a/.gitpod.dockerfile b/.gitpod.dockerfile index 684bb871c..12595d9bd 100644 --- a/.gitpod.dockerfile +++ b/.gitpod.dockerfile @@ -12,7 +12,7 @@ RUN bash -lc "rvm install ruby-$RUBY_VERSION && rvm use ruby-$RUBY_VERSION --def RUN echo "rvm_gems_path=/workspace/.rvm" > ~/.rvmrc # Install Node and Yarn -ENV NODE_VERSION=14.17.6 +ENV NODE_VERSION=16.13.1 RUN bash -c ". .nvm/nvm.sh && \ nvm install ${NODE_VERSION} && \ nvm alias default ${NODE_VERSION} && \ diff --git a/.nvmrc b/.nvmrc index 8351c1939..b6a7d89c6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14 +16 diff --git a/.travis.yml b/.travis.yml index ef80efb34..dc7c836c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ cache: bundler: true directories: - node_modules +before_cache: + - find node_modules -type f -name "*.node" -delete rvm: - 3.0.2 addons: diff --git a/Containerfile b/Containerfile index 4dbc7199d..cdf3c2683 100644 --- a/Containerfile +++ b/Containerfile @@ -1,5 +1,4 @@ -FROM quay.io/forem/ruby:3.0.2 as base - +FROM quay.io/forem/ruby:3.0.2-testing as base FROM base as builder @@ -58,7 +57,7 @@ USER root RUN dnf install --setopt install_weak_deps=false -y bash curl ImageMagick \ iproute jemalloc less libcurl \ - postgresql tzdata nodejs \ + postgresql tzdata nodejs libpq \ && dnf -y clean all \ && rm -rf /var/cache/yum diff --git a/bin/setup b/bin/setup index 2c1679c5d..7e1fc4aa4 100755 --- a/bin/setup +++ b/bin/setup @@ -22,6 +22,15 @@ FileUtils.chdir APP_ROOT do system! "gem list \"^foreman$\" -i --silent || gem install foreman" + # TODO: temporary fix for node 16 upgrade, remove after release as this triggers reinstallation + # of the canvas library (with its extension compiled against the versioned node symbol) + if File.exist?("node_modules/canvas/") + FileUtils.rm_rf("node_modules/canvas/") + # having removed the module ourselves, + # we need to coerce yarn, or remove the .yarn-integrity file + system("yarn install --check-files") + end + # Install JavaScript dependencies if using Yarn system("bin/yarn") diff --git a/package.json b/package.json index a73c3e92a..a1d71abe5 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Where programmers share ideas and help each other grow", "engines": { "yarn": ">=1.21.x", - "node": "14.x" + "node": "16.x" }, "main": "index.js", "directories": {