Hi, I'm currently looking into using npm v3 with nodejs v4. The problem I've run into is that npm is apparently part of the main nodejs package which effectively joins them at the hip for no apparent good reason.
Upstream ships npm with nodejs because they need npm to bootstrap the environment and cannot rely on a higher level dependency mechanism because there is none. As a result they encourage to simply install a new npm by replacing the old one.
In an rpm based environment however this does not work because the files are owned by the rpm and any reinstall or update will overwrite these files again with the ones from the rpm. On the other hand rpm has its own dependency resolution so the bootstrapping issue doesn't exists.
As a result I would like to see npm separated from nodejs so that alternative versions can be installed in the same way that some packages require a mail transfer agent but not a specific one. For nodejs this would mean that by default the npm version that is now bundled gets pulled in by default but that the user has the option to specify an explicit package (like npm v3) that can satisfy the npm dependency.
Regards, Dennis
On Mon, Dec 21, 2015 at 1:36 AM, Dennis Jacobfeuerborn dennisml@conversis.de wrote:
Hi, I'm currently looking into using npm v3 with nodejs v4. The problem I've run into is that npm is apparently part of the main nodejs package which effectively joins them at the hip for no apparent good reason.
Upstream ships npm with nodejs because they need npm to bootstrap the environment and cannot rely on a higher level dependency mechanism because there is none. As a result they encourage to simply install a new npm by replacing the old one.
In an rpm based environment however this does not work because the files are owned by the rpm and any reinstall or update will overwrite these files again with the ones from the rpm. On the other hand rpm has its own dependency resolution so the bootstrapping issue doesn't exists.
As a result I would like to see npm separated from nodejs so that alternative versions can be installed in the same way that some packages require a mail transfer agent but not a specific one. For nodejs this would mean that by default the npm version that is now bundled gets pulled in by default but that the user has the option to specify an explicit package (like npm v3) that can satisfy the npm dependency.
Probably best to discuss this on the Fedora nodsje mailing list [1], I know there's discussion on npm packaging already happening there and packaging of npm deps and other fun details.
[1] https://lists.fedoraproject.org/admin/lists/nodejs.lists.fedoraproject.org/
On 21/12/15 01:36, Dennis Jacobfeuerborn wrote:
I'm currently looking into using npm v3 with nodejs v4. The problem I've run into is that npm is apparently part of the main nodejs package which effectively joins them at the hip for no apparent good reason.
Upstream ships npm with nodejs because they need npm to bootstrap the environment and cannot rely on a higher level dependency mechanism because there is none. As a result they encourage to simply install a new npm by replacing the old one.
In an rpm based environment however this does not work because the files are owned by the rpm and any reinstall or update will overwrite these files again with the ones from the rpm. On the other hand rpm has its own dependency resolution so the bootstrapping issue doesn't exists.
As a result I would like to see npm separated from nodejs so that alternative versions can be installed in the same way that some packages require a mail transfer agent but not a specific one. For nodejs this would mean that by default the npm version that is now bundled gets pulled in by default but that the user has the option to specify an explicit package (like npm v3) that can satisfy the npm dependency.
I'm not really sure what exactly it is you're asking here...
Who exactly is it that you want to "separate" npm from nodejs? Fedora already ignores the npm that is bundled with nodejs and instead packages it by packaging all the modules that make up npm directly from their own sources, with a seprate srpm for each module.
As far as nodejs 4 / npm 3 goes we (the Node.js SIG referred to in Peter's answer) are already working on it - we have nodejs 4.2.3 built in a side tag and are working on the npm stack currently. Current working status of the npm dependency stack update is at:
https://fedoraproject.org/wiki/Node.js/npm_update_status
But as Peter said, the nodejs list is probably the best place to ask any questions.
Tom
On 21.12.2015 08:23, Tom Hughes wrote:
On 21/12/15 01:36, Dennis Jacobfeuerborn wrote:
I'm currently looking into using npm v3 with nodejs v4. The problem I've run into is that npm is apparently part of the main nodejs package which effectively joins them at the hip for no apparent good reason.
Upstream ships npm with nodejs because they need npm to bootstrap the environment and cannot rely on a higher level dependency mechanism because there is none. As a result they encourage to simply install a new npm by replacing the old one.
In an rpm based environment however this does not work because the files are owned by the rpm and any reinstall or update will overwrite these files again with the ones from the rpm. On the other hand rpm has its own dependency resolution so the bootstrapping issue doesn't exists.
As a result I would like to see npm separated from nodejs so that alternative versions can be installed in the same way that some packages require a mail transfer agent but not a specific one. For nodejs this would mean that by default the npm version that is now bundled gets pulled in by default but that the user has the option to specify an explicit package (like npm v3) that can satisfy the npm dependency.
I'm not really sure what exactly it is you're asking here...
Who exactly is it that you want to "separate" npm from nodejs? Fedora already ignores the npm that is bundled with nodejs and instead packages it by packaging all the modules that make up npm directly from their own sources, with a seprate srpm for each module.
As far as nodejs 4 / npm 3 goes we (the Node.js SIG referred to in Peter's answer) are already working on it - we have nodejs 4.2.3 built in a side tag and are working on the npm stack currently. Current working status of the npm dependency stack update is at:
https://fedoraproject.org/wiki/Node.js/npm_update_status
But as Peter said, the nodejs list is probably the best place to ask any questions.
It seems I have confused the nodejs package of Fedora with the one from Nodesource which actually puts npm right into the core nodejs rpm itself.
Looking at the Koji builds I can see that npm isn't bundled in the core rpm and since there now exists an official LTS release of nodejs that should also deal with the fact that Fedora version was quite old which was the reason for installing the Nodesource package in the first place.
Sorry for the confusion.
Regards, Dennis