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
I don't like nvm. It's coarse, and rough, and irritating, and it gets everywhere. Not like fnm. fnm (everything) is soft, and smooth.
For every other project I use, I opt to use fnm as it's faster, works more consistently, and does less whacky crap to the environment (it's also only possible to install a single way). Unfortunately, it only offers compatibility at the cli level, and does not use the same weird bash structure that nvm uses.
pm2 directly attempts to call nvm.sh and will access the node versions directly, relative to the installation. To provide compatibility with more node management systems, it might be easier just to provide the ability to leverage the existing commands that nvm, like nvm exec that are also replicated by other node version managers. Most commands are replicated 1:1, all of the ones needed for pm2 to do what it needs to do anyways.
In the end, it's still executing synchronous commands to trigger nvm actions. However, it's relying on fixed file structures - which makes it difficult to integrate fnm as it's expecting these to always exist of relying on known command line compatibility between managers.
For context, we use pm2 as a development tool as it has great monitoring and management features built in. This means we aren't always fixated on making sure everyone is spawning and running things the exact same way - that's what our continuous delivery pipeline is for. I'd rather not haphazardly bork the ecosystem file, or ask my coworkers to install my favourite tool or their dev systems wont work anymore.
The other option is to dynamically convert the export in the ecosystem file to directly use fnm, but that's even more annoying and confusing.
I can make these changes and submit a PR, but I wanted to understand the decision behind keeping so close to nvm. I don't want to make a PR if it wont be merged for reasons I don't know yet.
The text was updated successfully, but these errors were encountered:
What's going wrong?
I don't like
nvm
. It's coarse, and rough, and irritating, and it gets everywhere. Not likefnm
.fnm
(everything) is soft, and smooth.For every other project I use, I opt to use
fnm
as it's faster, works more consistently, and does less whacky crap to the environment (it's also only possible to install a single way). Unfortunately, it only offers compatibility at the cli level, and does not use the same weird bash structure thatnvm
uses.pm2
directly attempts to callnvm.sh
and will access the node versions directly, relative to the installation. To provide compatibility with more node management systems, it might be easier just to provide the ability to leverage the existing commands thatnvm
, likenvm exec
that are also replicated by other node version managers. Most commands are replicated 1:1, all of the ones needed for pm2 to do what it needs to do anyways.How could we reproduce this issue?
Look at the code here:
pm2/lib/Common.js
Lines 376 to 415 in da59cb6
In the end, it's still executing synchronous commands to trigger
nvm
actions. However, it's relying on fixed file structures - which makes it difficult to integratefnm
as it's expecting these to always exist of relying on known command line compatibility between managers.For context, we use
pm2
as a development tool as it has great monitoring and management features built in. This means we aren't always fixated on making sure everyone is spawning and running things the exact same way - that's what our continuous delivery pipeline is for. I'd rather not haphazardly bork the ecosystem file, or ask my coworkers to install my favourite tool or their dev systems wont work anymore.The other option is to dynamically convert the export in the ecosystem file to directly use fnm, but that's even more annoying and confusing.
I can make these changes and submit a PR, but I wanted to understand the decision behind keeping so close to
nvm
. I don't want to make a PR if it wont be merged for reasons I don't know yet.The text was updated successfully, but these errors were encountered: