unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Bitwarden build with "npm-build-system" : Fails to install dependencies : "npm ERR! code ENOTCACHED"
@ 2024-03-23 11:38 Pablo Zamora
  2024-03-24 13:09 ` Nils Landt
  0 siblings, 1 reply; 2+ messages in thread
From: Pablo Zamora @ 2024-03-23 11:38 UTC (permalink / raw)
  To: help-guix@gnu.org

Dear Guix,

First of all, thank you for developing this AMAZING OS !

I am facing an issue while trying to build 'bitwarden' from source with this package definition : https://paste.debian.net/1311741/

Currently in development within my personal channel : https://github.com/Pablo12345678901/guix-custom-channel/blob/master/dev/my-bitwarden.scm

There are the guix build logs : https://paste.debian.net/1311743

There are the npm logs : https://paste.debian.net/1311742/

The build fails during the 'configure phase with the error :

npm ERR! code ENOTCACHED
npm ERR! request to https://registry.npmjs.org/@angular-devkit%2fbuild-angular failed: cache mode is 'only-if-cached' but no cached response is available.

It seems that npm tries to download package dependencies but has no network during the build and fails. I printed dummy network connnexion (or no connexion) messages before and after the 'unpack' phases as well as before the 'configure' phase to debug and the result is that no network is available at those steps. I tried it with 'curl' and it says no network at all during the build. So far, I understood that this is normal but I would like to download the dependencies - HOW ?

I checked the 'gnu/packages/node-xyz.scm' to see whether other packages have a workaround and could not find a general pattern. It seems that every node package add 0,1 or 2 specific dependencies in the 'inputs' field but nothing huge compared to the bitwarden dependencies list. Here is the 'package.json' file pretty printed : https://paste.debian.net/1311744

So far, I have built packages with 'cmake-build-system', 'meson-build-system', 'python-build-system' as well as 'gnu-build-system' on my own channel : https://github.com/Pablo12345678901/guix-custom-channel/tree/master/my-packages/my-packages (production) and https://github.com/Pablo12345678901/guix-custom-channel/tree/master/training (training for fun). I do not know well the package manager 'npm' and how it manages its dependencies.

After around ~20 hours of trying by myself, I would appreciate any help/advice on how to install the dependencies and by the meantime, will continue to work on the debug.

Thank you.

Kind regards,

Pablo Zamora

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bitwarden build with "npm-build-system" : Fails to install dependencies : "npm ERR! code ENOTCACHED"
  2024-03-23 11:38 Bitwarden build with "npm-build-system" : Fails to install dependencies : "npm ERR! code ENOTCACHED" Pablo Zamora
@ 2024-03-24 13:09 ` Nils Landt
  0 siblings, 0 replies; 2+ messages in thread
From: Nils Landt @ 2024-03-24 13:09 UTC (permalink / raw)
  To: Pablo Zamora, help-guix@gnu.org

> Pablo Zamora <pablo.zamora@outlook.fr> hat am 23.03.2024 12:38 CET geschrieben:
>
> It seems that npm tries to download package dependencies but has no network during the build and fails. I printed dummy network connnexion (or no connexion) messages before and after the 'unpack' phases as well as before the 'configure' phase to debug and the result is that no network is available at those steps. I tried it with 'curl' and it says no network at all during the build. So far, I understood that this is normal but I would like to download the dependencies - HOW ?
> 
> I checked the 'gnu/packages/node-xyz.scm' to see whether other packages have a workaround and could not find a general pattern. It seems that every node package add 0,1 or 2 specific dependencies in the 'inputs' field but nothing huge compared to the bitwarden dependencies list. Here is the 'package.json' file pretty printed : https://paste.debian.net/1311744

In Guix you need to define all dependencies in terms of Guix packages. This is helped by the guix import subcommand.
Sadly, there is no importer for npm.

Your biggest chance of success might be to either write an importer, or find a way to convert the package.json to something that works with guix import json.
On the other hand, your biggest chance of happiness might be to not package npm packages in Guix.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-24 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-23 11:38 Bitwarden build with "npm-build-system" : Fails to install dependencies : "npm ERR! code ENOTCACHED" Pablo Zamora
2024-03-24 13:09 ` Nils Landt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).