You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scl prefix seems to include the version of node being used - so in this case, it wants nodejs20-npm, not nodejs-npm. In Fedora 37 this works fine, but on Fedora 38 it causes this error message:
npm: command not found
and I think why that's happening is that nodejs20-npm doesn't install /usr/bin/npm:
$ dnf repoquery -l nodejs20-npm | ag npm$
Last metadata expiration check: 1:54:37 ago on Mon 12 Jun 2023 04:43:08 PM AKDT.
/usr/lib/node_modules_20/npm
/usr/lib/node_modules_20/npm/bin/npm
/usr/lib/node_modules_20/npm
/usr/lib/node_modules_20/npm/bin/npm
That shim seems to be installed with the non-versioned package:
$ dnf repoquery -l nodejs-npm | ag npm$
Last metadata expiration check: 1:56:22 ago on Mon 12 Jun 2023 04:43:08 PM AKDT.
/usr/bin/npm
/usr/lib/node_modules_18/npm
/usr/lib/node_modules_18/npm/bin/npm
/usr/bin/npm
/usr/lib/node_modules_18/npm
/usr/lib/node_modules_18/npm/bin/npm
For the purposes of my build, I got it working with a little bit of sed:
cat "nodejs-${name}.spec"| sed 's/BuildRequires: %{?scl_prefix_nodejs}npm/BuildRequires: nodejs-npm/'> modified.spec
mv modified.spec "nodejs-${name}.spec"
but I think if I were to suggest a patch to npm2rpm, I'd say that you should instead use some macros to call /usr/lib/node_modules_20/npm directly, instead of calling npm and counting on that shim existing.
Cheers!
The text was updated successfully, but these errors were encountered:
scl should not be used on F37 as well, the macro is probably present in the buildroot but it should not be used, we used scl in our packages for EL7, maybe it's time to drop SCL @ehelms 😄
Hello!
I was trying this tool out for a build on COPR, and I ran into an interesting bug on fedora 38!
So when I generate the spec file, the build requires looks like this:
The scl prefix seems to include the version of node being used - so in this case, it wants
nodejs20-npm
, notnodejs-npm
. In Fedora 37 this works fine, but on Fedora 38 it causes this error message:and I think why that's happening is that
nodejs20-npm
doesn't install/usr/bin/npm
:That shim seems to be installed with the non-versioned package:
For the purposes of my build, I got it working with a little bit of sed:
but I think if I were to suggest a patch to
npm2rpm
, I'd say that you should instead use some macros to call/usr/lib/node_modules_20/npm
directly, instead of callingnpm
and counting on that shim existing.Cheers!
The text was updated successfully, but these errors were encountered: