Skip to content

Commit ef90db9

Browse files
committed
Revert to npm due to Docusaurus 2.x compatibility issues
Bun's package resolution installs different versions of dependencies (e.g., undici) that are incompatible with Node.js runtime, which is required for Docusaurus SSR. Keeping bun.lock for developers who want to use Bun locally, but CI/production builds use npm for compatibility.
1 parent 7419053 commit ef90db9

5 files changed

Lines changed: 23284 additions & 22 deletions

File tree

.ci/validate-feeds.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -e
55

66
echo "Building site to generate feeds..."
7-
bun run build
7+
npm run build
88

99
echo ""
1010
echo "Validating RSS/Atom feeds..."

.gitlab-ci.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,13 @@ variables:
2424
# Validate RSS/Atom feeds before building and deploying
2525
validate_feeds:
2626
stage: validate
27-
image: node:18-bookworm
28-
variables:
29-
BUN_INSTALL: "$HOME/.bun"
30-
PATH: "$HOME/.bun/bin:$PATH"
27+
image: node:18
3128
before_script:
32-
# Install xmllint for XML validation and bun
33-
- apt-get update && apt-get install -y libxml2-utils jq unzip
34-
- curl -fsSL https://bun.sh/install | bash
35-
- $HOME/.bun/bin/bun install --frozen-lockfile
29+
# Install xmllint for XML validation
30+
- apt-get update && apt-get install -y libxml2-utils jq
31+
- npm ci
3632
script:
37-
- export PATH="$HOME/.bun/bin:$PATH" && bash .ci/validate-feeds.sh
33+
- bash .ci/validate-feeds.sh
3834
artifacts:
3935
when: on_failure
4036
paths:

Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,17 @@ ENV UMAMI_WEBSITE_ID=$ARG_UMAMI_WEBSITE_ID
2424
ARG ARG_UMAMI_SCRIPT_URL
2525
ENV UMAMI_SCRIPT_URL=$ARG_UMAMI_SCRIPT_URL
2626

27-
# Install bun
28-
RUN curl -fsSL https://bun.sh/install | bash
29-
ENV BUN_INSTALL="/root/.bun"
30-
ENV PATH="$BUN_INSTALL/bin:$PATH"
31-
3227
WORKDIR /docs
3328

3429
COPY package.json ./
35-
COPY bun.lock ./
36-
RUN bun install --frozen-lockfile
30+
COPY package-lock.json ./
31+
RUN npm ci
3732

3833
COPY . .
3934
# Make cache folder if not exists.
4035
RUN mkdir -p .cache
4136
RUN mv .cache node_modules
42-
RUN bun run build
37+
RUN npm run build
4338

4439
EXPOSE 3000
45-
CMD ["bun", "run", "serve"]
40+
CMD ["npm", "run", "serve"]

0 commit comments

Comments
 (0)