Even on the latest npm versions, npm root -g and npm bin -g are really slow, surely because they load all sorts of files on program load. I would like to use them as part of shell scripts but they are really slow and expensive commands.
Solution - create an npm entry point that doesn't load everything, and for certain commands don't load all the code.
Even on the latest npm versions,
npm root -gandnpm bin -gare really slow, surely because they load all sorts of files on program load. I would like to use them as part of shell scripts but they are really slow and expensive commands.Solution - create an npm entry point that doesn't load everything, and for certain commands don't load all the code.