Cannot Build for Arch Linux

Operating system


Joplin version


What issue do you have?


I am the Arch Linux Joplin package maintainer and trying to update the Joplin package to 2.13.10, the problem packaging the cli version.
This is the problem I am seing seeems with the lib package.

➤ YN0061: │ highlight.js@npm:9.12.0 is deprecated: Version no longer supported. Upgrade to @latest
➤ YN0001: │ Error: @joplin/lib@npm:~2.7: No candidates found
    at ge (/home/masterkorp/Documents/projects/public/arch-pkgbuilds/joplin/src/joplin-2.13.10/.yarn/releases/yarn-3.6.4.cjs:439:8124)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.allSettled (index 0)
    at async io (/home/masterkorp/Documents/projects/public/arch-pkgbuilds/joplin/src/joplin-2.13.10/.yarn/releases/yarn-3.6.4.cjs:390:10398)
➤ YN0000: └ Completed in 2s 913ms

This how I build the package:

    msg2 "Packaging CLI with Repo Gulp"
    cd "${srcdir}/joplin-${pkgver}/packages/app-cli/"
    gulp_bin=$($yarn_bin bin gulp)
    msg2 "Using gulp: ${gulp_bin}"
    ${gulp_bin} build
    $yarn_bin pack

    msg2 "Installing package"
    mkdir -p "${pkgdir}/usr/share/joplin/"
    mv package.tgz "${pkgdir}/usr/share/joplin/"
    cd "${pkgdir}/usr/share/joplin/"
    $yarn_bin init

    $yarn_bin add ./package.tgz

This does not happen in 2.13.9 , did anything change in the build process?

Log file

full_full.log.txt (84.7 KB)

➤ YN0001: │ Error: @joplin/lib@npm:~2.7: No candidates found

Doesn't it mean it's trying to install version 2.7 of @joplin/lib? However it should be using version 2.13 (the version in the monorepo basically).

Also what branch or commit do you build? You should make sure to use one of the release-x.yz branches. So currently this one: GitHub - laurent22/joplin at release-2.13

Hello Laurant,

Thank you for your quick reply, I do download the file from the archive instead of cloning, that i get from the "joplin-${pkgver}.tar.gz::${pkgver}.tar.gz") link, I do checksum the file.
How can I check on the archive what is the version of the library ?

Yes getting the archive like that is fine as well, probably better than fetching the branch actually.

You can check what lib version it's using in packages/app-cli/package.json (search for @joplin/lib) but I don't see why it would be 2.7

On packages/app-cli/package.json

 "dependencies": {
    "@joplin/lib": "~2.13",
    "@joplin/renderer": "~2.13",
    "@joplin/utils": "~2.13",

doesnt the till allow a 2.7 ? Also this is who I build the libs

    msg2 "Building the workspace"
    $yarn_bin workspace @joplin/lib install
    $yarn_bin workspace @joplin/renderer install
    $yarn_bin workspace @joplin/app-desktop install
    $yarn_bin workspace @joplin/app-desktop run electron-builder build --linux

The yarn_bin is a variable that points to yarn binary, the version is stated by the joplin .yarnrc file.

Thank you so much for your help so far!

Alfredo Palhares

Hi @alfredopalhares ,
I had a quick look and found out that I wasn't even able to build version 2.12.18 which I used to. Error was different than yours though:

➤ YN0000: Package archive generated in /home/mixin/repos/aur/joplin/src/joplin-2.12.18/packages/app-cli/package.tgz
➤ YN0000: Done in 0s 717ms
-> Installing package
name: 'joplin',
packageManager: 'yarn@3.3.1'
error This project's package.json defines "packageManager": "yarn@3.3.1". However the current global version of Yarn is 1.22.21.

Presence of the "packageManager" field indicates that the project is meant to be used with Corepack, a tool included by default with all official Node.js distributions starting from 16.9 and 14.19.
Corepack must currently be enabled by running corepack enable in your terminal. For more information, check out corepack.
==> ERROR: A failure occurred in package_joplin().

After I downgraded yarn-1.22.21 to yarn-1.22.19 I've been able to build both Joplin 2.12.18 and 2.13.10 by only changing the version. So, unless I forgot some cleaning step, it looks more an issue in the latest version of yarn instead. Could you maybe double check in your machine? Thanks

By looking at issue 9015 in yarnpkg, a workaround to avoid this check in yarn-1.22.21 is to add an export SKIP_YARN_COREPACK_CHECK=0 in package_joplin()

But do you get the same ➤ YN0001: │ Error: @joplin/lib@npm:~2.7: No candidates found ? Or have you solved it in any way?

Alfredo Palhares

Hey Alfredo, sorry I forgot to turn notifications on here.
I never got your error, just the one I mentioned.
Tried now again and without the export line the build still fails, while with the export not.
Even after running npm cache clean --force it's still the same for me. Have you run it yourself? Would be good to check in docker if you have it installed.

Hi @alfredopalhares,
I checked with the archlinux:base-devel image now and it's the same, so it seems you have some specific issue. Note: I installed the gnome group since it couldn't find glib-object.h while building sharp but probably the real dependency is some smaller package.
The reset command I use is rm -fr src/ pkg/; npm cache clean --force;makepkg -sf. Could you try that please?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.