GNU bug report logs - #51838
[PATCH 00/11] guix: node-build-system: Support compiling add-ons with node-gyp.

Previous Next

Package: guix-patches;

Reported by: Philip McGrath <philip <at> philipmcgrath.com>

Date: Sun, 14 Nov 2021 12:43:01 UTC

Severity: normal

Tags: patch

Done: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #389 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: Pierre Langlois <pierre.langlois <at> gmx.com>
Cc: 51838 <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#51838] [PATCH v3 04/43] gnu: node: Add an npmrc file to set
 nodedir.
Date: Sun, 12 Dec 2021 15:19:03 -0500
Hi!

On 12/12/21 10:19, Pierre Langlois wrote:
> When I run `node-gyp configure' in my tree-sitter packages, it's not
> able to find the node dir and tries to download headers. So I need to
> set `npm_config_nodedir' manually, like so:

> I'm wondering if the npmrc approach here is working properly? I see in
> another patch you've used the `npx' command to run `node-gyp rebuild',
> should I be using that?

The npmrc configuration will only work of node-gyp is run through npm 
(or npx): https://github.com/nodejs/node-gyp#npm-configuration

In general, my current understanding is that you shouldn't have to run 
`node-gyp configure` explicitly. First, `node-gyp rebuild` includes a 
`node-gyp configure` step, but, more broadly, Guix's configure and build 
phases should usually do any needed addon building automatically. Aside 
from packages that deleted the configue phase, the main exception I've 
found is packages that try to use some strategy for downloading 
pre-built binaries: in some cases I've patched them enough to make 
automatic compilation work, but maybe sometimes just doing things 
manually is less work. If you do need to run `node-gyp` explicitly, the 
`npx` approach is the best I've found.

-Philip




This bug report was last modified 3 years and 195 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.