Bug#1070103: libnode-dev: Version bump of NODE_MODULE_VERSION makes node-gyp build broken modules

2024-05-01 Thread Jérémy Lal
Le mer. 1 mai 2024 à 10:11, Matijs van Zuijlen  a écrit :

> On 30/04/2024 09:33, Matijs van Zuijlen wrote:
> > On 30/04/2024 08:53, Jérémy Lal wrote:
> >> To solve both, you should do `pkgjs-install` next to package.json, so
> >> that your system-installed
> >> modules are symlinked to the local node_modules directory.
> >> Then "npm install" shouldn't remove the symlinks and install just the
> >> missing ones.
> >
> > There is no package.json, because I am using npm -g install renovate,
> > not installing from a checked-out repository. Is npm -g install not
> > supposed to work?
> >
> > I will now try installing from the repository and let you know if that
> > works.
>
> I tried this and I can now run renovate from inside its repository, but
> I don't know how to then install the renovate tool for general use. So
> this is not (yet) a replacement for npm -g install.
>

npm -g install is not a good tool anyway...


Bug#1070103: libnode-dev: Version bump of NODE_MODULE_VERSION makes node-gyp build broken modules

2024-05-01 Thread Matijs van Zuijlen

On 30/04/2024 09:33, Matijs van Zuijlen wrote:

On 30/04/2024 08:53, Jérémy Lal wrote:
To solve both, you should do `pkgjs-install` next to package.json, so 
that your system-installed

modules are symlinked to the local node_modules directory.
Then "npm install" shouldn't remove the symlinks and install just the 
missing ones.


There is no package.json, because I am using npm -g install renovate, 
not installing from a checked-out repository. Is npm -g install not 
supposed to work?


I will now try installing from the repository and let you know if that 
works.


I tried this and I can now run renovate from inside its repository, but 
I don't know how to then install the renovate tool for general use. So 
this is not (yet) a replacement for npm -g install.


Kind regards,
Matijs van Zuijlen



Bug#1070103: libnode-dev: Version bump of NODE_MODULE_VERSION makes node-gyp build broken modules

2024-04-30 Thread Matijs van Zuijlen

On 30/04/2024 08:53, Jérémy Lal wrote:



Le mar. 30 avr. 2024 à 08:21, Matijs van Zuijlen > a écrit :


Package: libnode-dev
Version: 18.20.1+dfsg-4+b2
Severity: normal

Dear maintainer,

I tried building and installing the renovate tool from npm, using
npm -g install renovate.

This went well but when I run it I get the message

   The module

'/usr/local/lib/node_modules/renovate/node_modules/re2/build/Release/re2.node'
   was compiled against a different Node.js version using
   NODE_MODULE_VERSION 108. This version of Node.js requires
   NODE_MODULE_VERSION 109. Please try re-compiling or re-installing
   the module (for instance, using `npm rebuild` or `npm install

After some investigation I found out that re2.node is compiled using a
tool called node-gyp, and that tool fetches the node_version.h from
https://nodejs.org/download/release/v18.20.1/node-v18.20.1-headers.tar.gz 

instead of using the locally installed one. This
upstream version has 108 as the NODE_MODULE_VERSION, of course.


You're supposed to use system-installed modules, especially for node-gyp.
If you're using /usr/bin/node-gyp and it is doing that, then it's a bug 
in node-gyp.

Also note that node-re2 is available in debian.


I have debian versions of both node-re2 and node-gyp installed, but npm 
-g install renovate doesn't pick those up. The npm I'm using is the npm 
from the debian npm package.


To solve both, you should do `pkgjs-install` next to package.json, so 
that your system-installed

modules are symlinked to the local node_modules directory.
Then "npm install" shouldn't remove the symlinks and install just the 
missing ones.


There is no package.json, because I am using npm -g install renovate, 
not installing from a checked-out repository. Is npm -g install not 
supposed to work?


I will now try installing from the repository and let you know if that 
works.


In any case, node 20 or 22 is going to debian unstable soon enough, and 
we'll have "standard" modules versions again.


Looking forward to it!


Jérémy




Bug#1070103: libnode-dev: Version bump of NODE_MODULE_VERSION makes node-gyp build broken modules

2024-04-30 Thread Jérémy Lal
Le mar. 30 avr. 2024 à 08:21, Matijs van Zuijlen  a
écrit :

> Package: libnode-dev
> Version: 18.20.1+dfsg-4+b2
> Severity: normal
>
> Dear maintainer,
>
> I tried building and installing the renovate tool from npm, using
> npm -g install renovate.
>
> This went well but when I run it I get the message
>
>   The module
> '/usr/local/lib/node_modules/renovate/node_modules/re2/build/Release/re2.node'
>   was compiled against a different Node.js version using
>   NODE_MODULE_VERSION 108. This version of Node.js requires
>   NODE_MODULE_VERSION 109. Please try re-compiling or re-installing
>   the module (for instance, using `npm rebuild` or `npm install
>
> After some investigation I found out that re2.node is compiled using a
> tool called node-gyp, and that tool fetches the node_version.h from
> https://nodejs.org/download/release/v18.20.1/node-v18.20.1-headers.tar.gz
> instead of using the locally installed one. This
> upstream version has 108 as the NODE_MODULE_VERSION, of course.
>

You're supposed to use system-installed modules, especially for node-gyp.
If you're using /usr/bin/node-gyp and it is doing that, then it's a bug in
node-gyp.
Also note that node-re2 is available in debian.

To solve both, you should do `pkgjs-install` next to package.json, so that
your system-installed
modules are symlinked to the local node_modules directory.
Then "npm install" shouldn't remove the symlinks and install just the
missing ones.

In any case, node 20 or 22 is going to debian unstable soon enough, and
we'll have "standard" modules versions again.

Jérémy


Bug#1070103: libnode-dev: Version bump of NODE_MODULE_VERSION makes node-gyp build broken modules

2024-04-30 Thread Matijs van Zuijlen
Package: libnode-dev
Version: 18.20.1+dfsg-4+b2
Severity: normal

Dear maintainer,

I tried building and installing the renovate tool from npm, using
npm -g install renovate.

This went well but when I run it I get the message

  The module 
'/usr/local/lib/node_modules/renovate/node_modules/re2/build/Release/re2.node'
  was compiled against a different Node.js version using
  NODE_MODULE_VERSION 108. This version of Node.js requires
  NODE_MODULE_VERSION 109. Please try re-compiling or re-installing
  the module (for instance, using `npm rebuild` or `npm install

After some investigation I found out that re2.node is compiled using a
tool called node-gyp, and that tool fetches the node_version.h from
https://nodejs.org/download/release/v18.20.1/node-v18.20.1-headers.tar.gz
instead of using the locally installed one. This
upstream version has 108 as the NODE_MODULE_VERSION, of course.

I have tried to resolve this by first running

  node-gyp install

and then editing the downloaded node_version.h in 
~/.cache/node-gyp/18.20.1/include/node
manually, and finally re-installing renovate, but that didn't work and
it seems node-gyp simply re-downloaded the 'correct' node_version.h.

Kind regards,
Matijs


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.7.12-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_IE.UTF-8, LC_CTYPE=en_IE.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_IE:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libnode-dev depends on:
ii  libnode109  18.20.1+dfsg-4+b2
ii  libssl-dev  3.2.1-3
ii  libuv1-dev  1.48.0-1.1

libnode-dev recommends no packages.

libnode-dev suggests no packages.

-- no debconf information