Bug 32951 - No rule to make target calendar.css needed by pm_to_blib
Summary: No rule to make target calendar.css needed by pm_to_blib
Status: In Discussion
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-13 16:29 UTC by paxed
Modified: 2023-09-30 08:39 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2023-02-13 16:29:39 UTC
Installing (not via docker), make && make install complains:

----

Generating a Unix-style Makefile
Writing Makefile for koha
Writing MYMETA.yml and MYMETA.json
"/usr/bin/perl" build-resources.PL
Usage: yarn [options]

yarn: error: no such option: --frozen-lockfile
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'build:prod'
make: *** No rule to make target 'koha-tmpl/intranet-tmpl/prog/css/calendar.css', needed by 'pm_to_blib'.  Stop.
"/usr/bin/perl" build-resources.PL
Usage: yarn [options]

yarn: error: no such option: --frozen-lockfile
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'build:prod'
make: *** No rule to make target 'koha-tmpl/intranet-tmpl/prog/css/calendar.css', needed by 'pm_to_blib'.  Stop.

----

yarn --version
0.32+git

uname reports "Debian 6.0.8-1"
Comment 1 David Cook 2023-02-13 23:07:39 UTC
For a second, I thought that was Debian Squeeze 6.0.8, but that 6.0.8 will be the kernel version. 

In any case, the issue is the yarn version. You should download a more recent version of Yarn using "deb https://dl.yarnpkg.com/debian/ stable main".

koha-testing-docker uses v1.22.17.
Comment 2 David Cook 2023-02-13 23:15:49 UTC
Are there instructions that you follow for installing Koha in this way?
Comment 3 paxed 2023-02-14 06:55:39 UTC
(In reply to David Cook from comment #2)
> Are there instructions that you follow for installing Koha in this way?

I'm using my own script, which automatically installs koha into a new lxc container. Looks like the problem is package names "yarn" vs "yarnpkg" - I'd told the script to install yarn, which I thought was yarn, but it seems the package that has node.js yarn is yarnpkg. (wtf?)

... Hmm, but it seems there'll be a problem:


root@yarn-test:/# yarn --version
bash: yarn: command not found
root@yarn-test:/# yarnpkg --version
1.22.10


So, installing yarn from the debian packages, it'll be called yarnpkg, not yarn.
Comment 4 Jonathan Druart 2023-02-14 09:37:08 UTC
ln -s ? :)
Comment 5 Jonathan Druart 2023-02-14 09:39:28 UTC
This is what we do for ktd's docker image

# Add yarn repo
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
   && wget -O- -q https://dl.yarnpkg.com/debian/pubkey.gpg \
      | gpg --dearmor \
      | tee /usr/share/keyrings/yarnkey.gpg >/dev/null \
   && echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list

# Install Node.js (includes npm) and Yarn
RUN apt-get update \
   && apt-get -y install nodejs yarn \
   && rm -rf /var/cache/apt/archives/* \
   && rm -rf /var/lib/api/lists/*
Comment 6 paxed 2023-02-14 10:09:33 UTC
(In reply to Jonathan Druart from comment #4)
> ln -s ? :)

Yup, did that. Just annoyed by it.
Comment 7 David Cook 2023-02-14 23:46:39 UTC
(In reply to paxed from comment #6)
> (In reply to Jonathan Druart from comment #4)
> > ln -s ? :)
> 
> Yup, did that. Just annoyed by it.

Yeah, I nearly got caught out by that same thing. Debian packages it as yarnpkg for some reason. Best to go straight to the source. (I find a similar thing with Docker. Sometimes I use the Debian packaging, sometimes I use the Docker Debian packaging. At least in that case the binary name stays the same...)
Comment 8 paxed 2023-02-15 06:40:38 UTC
This issue with the Debian packages should probably be documented somewhere, in installation docs?
Comment 9 David Cook 2023-02-15 22:48:45 UTC
(In reply to paxed from comment #8)
> This issue with the Debian packages should probably be documented somewhere,
> in installation docs?

That's why I asked which installation docs you were using ;). 

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32951#c2
Comment 10 Aleisha Amohia 2023-09-27 20:27:24 UTC
We have pbuilder setup following this doco https://wiki.koha-community.org/wiki/Building_Debian_Packages_-_The_Easy_Way

and we're getting the same error as this during the build.

make[1]: *** No rule to make target 'koha-tmpl/intranet-tmpl/prog/css/calendar.css', needed by 'pm_to_blib'.  Stop.

Just before that error we also see this:

Error: ENOENT: no such file or directory, uv_resident_set_memory
    at process.memoryUsage (internal/process/per_thread.js:159:5)
    at ConsoleReporter.checkPeakMemory (/usr/share/yarn/lib/cli.js:33421:40)
    at ConsoleReporter.initPeakMemoryCounter (/usr/share/yarn/lib/cli.js:33412:10)
    at /usr/share/yarn/lib/cli.js:88353:14
    at Generator.next (<anonymous>)
    at step (/usr/share/yarn/lib/cli.js:310:30)
    at /usr/share/yarn/lib/cli.js:328:14
    at new Promise (<anonymous>)
    at new F (/usr/share/yarn/lib/cli.js:5305:28)
    at /usr/share/yarn/lib/cli.js:307:12

Any ideas?