oae / gnome-shell-pano

Next-gen Clipboard Manager for Gnome Shell
https://extensions.gnome.org/extension/5278/pano/
GNU General Public License v2.0
978 stars 52 forks source link

Can't build from source #284

Open aadilayub opened 1 month ago

aadilayub commented 1 month ago

The validate-color package seems to be missing a manifest?

gnome-shell-pano on  master [!?] via  v20.12.2 took 3s 
❯ yarn install
➤ YN0000: · Yarn 4.2.2
➤ YN0000: ┌ Resolution step
➤ YN0014: │ validate-color@https://gitpkg.now.sh/dreamyguy/validate-color/src/validate-color: Only some patterns can be imported from legacy lockfiles (not "https://gitpkg.now.sh/dreamyguy/validate-color/src/validate-color#9e890cb48fed5e22027a67d98750232c4ce780f6")
➤ YN0001: │ Error: validate-color@https://gitpkg.now.sh/dreamyguy/validate-color/src/validate-color: Manifest not found
    at AE.find (/var/home/aadil/.dev/gnome-shell-pano/.yarn/releases/yarn-4.2.2.cjs:140:120021)
    at async /var/home/aadil/.dev/gnome-shell-pano/.yarn/releases/yarn-4.2.2.cjs:559:12938
    at async Object.xZe (/var/home/aadil/.dev/gnome-shell-pano/.yarn/releases/yarn-4.2.2.cjs:140:53847)
    at async G2.resolve (/var/home/aadil/.dev/gnome-shell-pano/.yarn/releases/yarn-4.2.2.cjs:559:12899)
    at async Pd.resolve (/var/home/aadil/.dev/gnome-shell-pano/.yarn/releases/yarn-4.2.2.cjs:141:1451)
    at async Pd.resolve (/var/home/aadil/.dev/gnome-shell-pano/.yarn/releases/yarn-4.2.2.cjs:141:1451)
    at async /var/home/aadil/.dev/gnome-shell-pano/.yarn/releases/yarn-4.2.2.cjs:210:7249
    at async Ky (/var/home/aadil/.dev/gnome-shell-pano/.yarn/releases/yarn-4.2.2.cjs:140:53910)
    at async ne (/var/home/aadil/.dev/gnome-shell-pano/.yarn/releases/yarn-4.2.2.cjs:210:7231)
    at async Promise.allSettled (index 55)
➤ YN0000: └ Completed in 0s 576ms
➤ YN0000: · Failed with errors in 0s 602ms

I'm running the latest version of yarn, node v20, and Fedora 40 as the base system.

Totto16 commented 1 month ago

That could be the case, indeed, since we use https://gitpkg.now.sh/dreamyguy/validate-color/src/validate-color instead of the regular npm package, and for good reasons, since the normal one doesn't work with ESM.

However, in the CI and locally we use yarn v1.22.22 (I think it is the version nodes ships with corepack ?!?)

So there it works, I am no expert regarding the ways you can get yarn, and different yarn versions 🤷🏼‍♂️

Maybe we should setup a .zip extension CI build, that generate the needed zip for the extension, so that you don't have to deal with that thing.

That said, it's not possible to replace the used package of validate-color ( I tried it a while ago). So the best thing we can do. Is trying to use the same yarn version. Could you try and using an environment from e.g. nvm and get yarn by typing corepack enable. Does it work then?

segher86 commented 1 month ago

When using yarn set version 1.22.22 it worked for me.

aadilayub commented 1 month ago

When using yarn set version 1.22.22 it worked for me.

this worked! thanks. Should probably add that to the README.