Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails for [email protected] with nodejs@v23 on Linux #11393

Open
sahal opened this issue Nov 15, 2024 · 1 comment
Open

build fails for [email protected] with nodejs@v23 on Linux #11393

sahal opened this issue Nov 15, 2024 · 1 comment
Labels
bug It's a bug

Comments

@sahal
Copy link

sahal commented Nov 15, 2024

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

@sahal
Copy link
Author

sahal commented Nov 18, 2024

OK, I did some more testing and it looks like this is consistently failing only on node 23 right now. At least in docker/podman.

This is my methodology for testing: https://gist.github.com/sahal/ec57d2e63764e7b125fca54267977bdc

build-log-joplin-18.txt
build-log-joplin-19.txt
build-log-joplin-20.txt
build-log-joplin-21.txt
build-log-joplin-22.txt
build-log-joplin-23-0.txt
build-log-joplin-23-1.txt
build-log-joplin-23-2.txt

Canvas seems to build successfully on its own when using yarn add on all versions 18-23:
Automattic/node-canvas#2448 (comment)

Looking at the failed node 23 builds, it looks like this might be related to nodejs/nan#979 rather than the canvas issue linked above. When I isolate the canvas build, it will work every time in node 18-23.

@sahal sahal changed the title build fails for [email protected] with [email protected] on Linux build fails for [email protected] with nodejs@v23 on Linux Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

1 participant