make sure that you run only a SINGLE instance of this function at a time.
that's because running multiple installations in parallel on the same working-directory will corrupt shared files.
this becomes very evident in larger projects when multiple npm install commands are run in parallel,
resulting in only a few of them actually successfully installing,
while the rest are either partially installed, or ignored altogether.
to mitigate this issue, run your multiple npm install commands through a synchronous task queuer,
like the one that can be generated from the syncTaskQueueFactory utility function in this library.
Caution
in npm version >=7 and deno version >=2.7, both package managers aggressively purge existing installed packages inside of ./node_modules/,
whenever the package managers are ran, if the said packages are not a part of ./package.json.
this means that you will likely want to install all previously installed packages along with your new package if you wish to preserve them.
this function installs multiple npm-packages to your project's
"./node_modules/"folder. see NpmAutoInstallCliConfig and NpmPluginSetupConfig.autoInstall for details on how to customize.make sure that you run only a SINGLE instance of this function at a time. that's because running multiple installations in parallel on the same working-directory will corrupt shared files.
this becomes very evident in larger projects when multiple
npm installcommands are run in parallel, resulting in only a few of them actually successfully installing, while the rest are either partially installed, or ignored altogether.to mitigate this issue, run your multiple
npm installcommands through a synchronous task queuer, like the one that can be generated from the syncTaskQueueFactory utility function in this library.in
npmversion>=7anddenoversion>=2.7, both package managers aggressively purge existing installed packages inside of./node_modules/, whenever the package managers are ran, if the said packages are not a part of./package.json. this means that you will likely want to install all previously installed packages along with your new package if you wish to preserve them.