diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index e30c3c50..abfa42e3 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -18,6 +18,9 @@ jobs: with: node-version-file: package.json + - name: Install npm + run: npm install --global npm@12.2.2 + - name: Install Dependencies run: npm ci diff --git a/.gitpod.yml b/.gitpod.yml index b8b9fade..a8806e23 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -12,6 +12,7 @@ tasks: export DEMO_APPS_DOMAIN=$(gp url) - init: | cp sample.env .env + npm install --global npm@12.2.2 npm ci mkdir /workspace/log mongod --fork --dbpath /data/db --logpath /workspace/log/mongod.log diff --git a/README.md b/README.md index 5c6a6bb8..c12af93f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # Example Certification Projects +## Development + +Use Node.js 26.13 or newer in the Node 26 release line and npm 12. Install +dependencies with: + +```console +npm ci +``` + +To build and start the complete Docker Compose stack, copy `sample.env` to +`.env`, then run `npm run build` and `npm start` from the repository root. + ## Responsive Web Design - Tribute Page diff --git a/apps/anonymous-message-board/Dockerfile b/apps/anonymous-message-board/Dockerfile index 267e93b2..301eba66 100644 --- a/apps/anonymous-message-board/Dockerfile +++ b/apps/anonymous-message-board/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/build-a-pinterest-clone/Dockerfile b/apps/build-a-pinterest-clone/Dockerfile index fb8044da..f476bc36 100644 --- a/apps/build-a-pinterest-clone/Dockerfile +++ b/apps/build-a-pinterest-clone/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/chart-the-stock-market/Dockerfile b/apps/chart-the-stock-market/Dockerfile index 3112f92e..1957463f 100644 --- a/apps/chart-the-stock-market/Dockerfile +++ b/apps/chart-the-stock-market/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/exercise-tracker/Dockerfile b/apps/exercise-tracker/Dockerfile index 9a62e6f6..5104bd34 100644 --- a/apps/exercise-tracker/Dockerfile +++ b/apps/exercise-tracker/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/image-search-abstraction-layer/Dockerfile b/apps/image-search-abstraction-layer/Dockerfile index 47418ebd..bb28a58c 100644 --- a/apps/image-search-abstraction-layer/Dockerfile +++ b/apps/image-search-abstraction-layer/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/issue-tracker/Dockerfile b/apps/issue-tracker/Dockerfile index 703c661f..2f0491f0 100644 --- a/apps/issue-tracker/Dockerfile +++ b/apps/issue-tracker/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/manage-a-book-trading-club/Dockerfile b/apps/manage-a-book-trading-club/Dockerfile index ef0407e2..82d3a37e 100644 --- a/apps/manage-a-book-trading-club/Dockerfile +++ b/apps/manage-a-book-trading-club/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/personal-library/Dockerfile b/apps/personal-library/Dockerfile index f4cf7dd7..3d05846b 100644 --- a/apps/personal-library/Dockerfile +++ b/apps/personal-library/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/pokeapi-proxy/Dockerfile b/apps/pokeapi-proxy/Dockerfile index f2db11ae..7757cb51 100644 --- a/apps/pokeapi-proxy/Dockerfile +++ b/apps/pokeapi-proxy/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/stock-price-checker-proxy/Dockerfile b/apps/stock-price-checker-proxy/Dockerfile index 91acec5f..c9430cf9 100644 --- a/apps/stock-price-checker-proxy/Dockerfile +++ b/apps/stock-price-checker-proxy/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/stock-price-checker/Dockerfile b/apps/stock-price-checker/Dockerfile index 20368e59..e26d12f4 100644 --- a/apps/stock-price-checker/Dockerfile +++ b/apps/stock-price-checker/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/twitch-proxy/Dockerfile b/apps/twitch-proxy/Dockerfile index 04667ca4..d05c6734 100644 --- a/apps/twitch-proxy/Dockerfile +++ b/apps/twitch-proxy/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/url-shortener-microservice/Dockerfile b/apps/url-shortener-microservice/Dockerfile index f830cb56..f3048240 100644 --- a/apps/url-shortener-microservice/Dockerfile +++ b/apps/url-shortener-microservice/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/voting-app/Dockerfile b/apps/voting-app/Dockerfile index cf6a85d0..179fb3eb 100644 --- a/apps/voting-app/Dockerfile +++ b/apps/voting-app/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/apps/weather-proxy/Dockerfile b/apps/weather-proxy/Dockerfile index d966b111..8965639c 100644 --- a/apps/weather-proxy/Dockerfile +++ b/apps/weather-proxy/Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . . diff --git a/package-lock.json b/package-lock.json index 9925c92f..3360c82c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,8 +21,8 @@ "prettier": "2.8.8" }, "engines": { - "node": "18", - "npm": "9" + "node": ">=26.13.0 <27", + "npm": "12" } }, "node_modules/@ampproject/remapping": { diff --git a/package.json b/package.json index d91bf592..03ec9a6b 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,10 @@ "name": "@freecodecamp/demo-projects", "version": "0.0.0", "engines": { - "node": "18", - "npm": "9" + "node": ">=26.13.0 <27", + "npm": "12" }, + "packageManager": "npm@12.2.2", "description": "Example projects for the freeCodeCamp.org curriculum", "scripts": { "lint": "eslint apps test --max-warnings 0 && prettier --check .", diff --git a/shared.Dockerfile b/shared.Dockerfile index 58b2586f..b2bc2479 100644 --- a/shared.Dockerfile +++ b/shared.Dockerfile @@ -1,7 +1,9 @@ -FROM node:18-bullseye-slim +FROM node:26-bookworm-slim WORKDIR /app +RUN npm install --global npm@12.2.2 + # Copy over all the files in the project directory to /app early # for rollup bundling COPY . .