[Pkg-javascript-devel] Bug#1070103: libnode-dev: Version bump of NODE_MODULE_VERSION makes node-gyp build broken modules
Jérémy Lal
kapouer at melix.org
Tue Apr 30 07:53:06 BST 2024
Le mar. 30 avr. 2024 à 08:21, Matijs van Zuijlen <matijs at matijs.net> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20240430/c48d2291/attachment.htm>
More information about the Pkg-javascript-devel
mailing list