Probably dumb question, but I can’t figure this out on my own…
I want to install current nodejs lts + npm. Installing just nodejs-lts-hydrogen which has npm as optional dependency gives me only nodejs. On the other hand npm has as a dependency current nodejs, so if I’ll just separately install npm - it’ll also fetch current nodejs which I don’t need.
How can I tell pacman to install nodejs-lts-hydrogen together with npm as depandacy so that if say later I’ll decide to uninstall it with pacman -Rs - it’ll automatically remove npm as well?
And another question: npm is marked as outdated in the repo - is it at all safe to install such package?
I’m aware about nvm but I don’t like it and prefer not to use it since I need only one nodejs-npm pair anyway.
Installing them both with one command solves the order problem and the second command marks npm as a dependency.
That basically means there is a newer version available then what is in the repos. I don’t have enough in-depth knowledge of npm to know if that is a problem or not.
In general, it is something to be aware of but not definitively a problem. It depends on the package and what is contained in the update(s).
Thank you so much!
Was reading a little bit about --asdeps option
May I also ask one thing:
What do you mean by that? I’m afraid I don’t understand that statement. Is it about the fact that with such command npm during installation won’t pull current nodejs listed as ‘must’ dependency?
Yes. nodejs-lts-hydrogen provides nodejs. So if you have nodejs-lts-hydrogen installed(or are installing it) then npm will see it’s dependency as satisfied.