Skip to content

build fails for canvas@2.11.2 with nodejs@v23 on Linux #11393

@sahal

Description

@sahal

Operating system

Linux

Joplin version

3.1.24

Desktop version info

No response

Current behaviour

This is related to Automattic/node-canvas#2448

I used this Dockerfile:

Based on node:lts-slim: Dockerhub Build Dockerfile

Node version: 20.11.0

FROM node:lts-slim AS build

ARG JOPLIN_VERSION=3.1.24

RUN apt-get update && apt-get install -y --no-install-recommends \
    make \
    g++ \
    dumb-init \
    build-essential \
    libcairo2-dev \
    libpango1.0-dev \
    libjpeg-dev \
    libgif-dev \
    librsvg2-dev \
    python3 \
    wget \
    && rm -rf /var/lib/apt/lists/*

COPY install.sh /home/node/
RUN /home/node/install.sh "${JOPLIN_VERSION}"

With the following install script:

#!/usr/bin/env bash

set -o errexit
set -o nounset

JOPLIN_VERSION="${1:-3.1.24}"

wget --no-check-certificate "https://github.com/laurent22/joplin/archive/refs/tags/v${JOPLIN_VERSION}.tar.gz" -O joplin.tar.gz

mkdir -p joplin
tar xvvf joplin.tar.gz -C joplin

pushd joplin

JOPLIN_VER_DIR=$(find . -maxdepth 1 -type d -name "joplin*")
pushd "${JOPLIN_VER_DIR}"

yarn_bin="$(find .yarn/releases -type f -name "*.cjs")"
"${yarn_bin}" install --inline-builds

Based on your build for the latest release, you're using Node v18.15.0. Will add a comment when after I rerun the build with a lower version. AFAIK, there are currently no upper limits in your package.json for node versions, however.

Expected behaviour

Joplin build doesn't fail.

Logs

joplin-build-log-2024-11-15.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt's a bugstaleAn issue that hasn't been active for a while...

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions