# Cannot Build for Arch Linux

**URL:** <https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625>\
**Category:** Support\
**Created:** [23 December 2023 17:46 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625 "2023-12-23T17:46:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfredopalhares](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/alfredopalhares/32/6016_2.png) [@alfredopalhares](https://discourse.joplinapp.org/u/alfredopalhares)\
**Post date:** [23 December 2023 17:46 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/1 "2023-12-23T17:46:39Z")

</div>

### Operating system

Linux

### Joplin version

2.13.10

### What issue do you have?

Hello,

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.

```auto
➤ 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:

```auto
    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](https://discourse.joplinapp.org/uploads/short-url/gqjjyFEYdD6XQRz1NzfTnAEre45.txt) (84.7 KB)

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [23 December 2023 17:53 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/2 "2023-12-23T17:53:20Z")

</div>

> ➤ 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](https://github.com/laurent22/joplin/blob/973193623a42ba6f54e1c8fec2b3ce67e7cc76aa/packages/app-cli/package.json#L44) (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](https://github.com/laurent22/joplin/tree/release-2.13)

---

<div class="post-metadata">

**Author:** ![alfredopalhares](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/alfredopalhares/32/6016_2.png) [@alfredopalhares](https://discourse.joplinapp.org/u/alfredopalhares)\
**Post date:** [23 December 2023 17:56 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/3 "2023-12-23T17:56:57Z")

</div>

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::https://github.com/laurent22/joplin/archive/v${pkgver}.tar.gz")` link, I do checksum the file.  
How can I check on the archive what is the version of the library ?

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [23 December 2023 18:13 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/4 "2023-12-23T18:13:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alfredopalhares](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/alfredopalhares/32/6016_2.png) [@alfredopalhares](https://discourse.joplinapp.org/u/alfredopalhares)\
**Post date:** [23 December 2023 19:00 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/5 "2023-12-23T19:00:35Z")

</div>

On `packages/app-cli/package.json`

```auto
 "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

```auto
    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!

Regards,  
Alfredo Palhares

---

<div class="post-metadata">

**Author:** ![mixin82](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mixin82/32/12798_2.png) [@mixin82](https://discourse.joplinapp.org/u/mixin82)\
**Post date:** [26 December 2023 13:20 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/6 "2023-12-26T13:20:23Z")

</div>

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().  
> Aborting...

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

---

<div class="post-metadata">

**Author:** ![mixin82](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mixin82/32/12798_2.png) [@mixin82](https://discourse.joplinapp.org/u/mixin82)\
**Post date:** [27 December 2023 20:13 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/7 "2023-12-27T20:13:19Z")

</div>

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()`

---

<div class="post-metadata">

**Author:** ![alfredopalhares](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/alfredopalhares/32/6016_2.png) [@alfredopalhares](https://discourse.joplinapp.org/u/alfredopalhares)\
**Post date:** [28 December 2023 21:13 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/8 "2023-12-28T21:13:30Z")

</div>

> [@mixin82](#):
>
> `export SKIP_YARN_COREPACK_CHECK=0`

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

Regards,  
Alfredo Palhares

---

<div class="post-metadata">

**Author:** ![mixin82](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mixin82/32/12798_2.png) [@mixin82](https://discourse.joplinapp.org/u/mixin82)\
**Post date:** [6 January 2024 20:35 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/9 "2024-01-06T20:35:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mixin82](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mixin82/32/12798_2.png) [@mixin82](https://discourse.joplinapp.org/u/mixin82)\
**Post date:** [7 January 2024 17:32 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/10 "2024-01-07T17:32:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)\
**Post date:** [6 February 2024 17:33 UTC](https://discourse.joplinapp.org/t/cannot-build-for-arch-linux/34625/11 "2024-02-06T17:33:16Z")

</div>

Closed on 6 February 2024 17:33 UTC

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