0

I'm trying to speed up a continuous integration stage. Currently, it spends about 5 minutes installing unneeded NPM packages, then 30 seconds running the stage.

I was hoping to speed it up by replacing the step npm install with npm install package1 package2 etc, only installing the necessary packages for that step.

However, NPM reads the package.json file and trys to install all packages anyways. Is there any way to get NPM to ignore package.json, and simply locally install a few packages?

David Mihal
  • 944
  • 6
  • 23
  • Have you tried this: https://stackoverflow.com/a/36999566/5442132 – myselfmiqdad Mar 08 '18 at 17:35
  • @miqdadamirali Looks like that flag will still install _some_ packages from package.json. The only solution I can think of is to have a script that renames package.json before running install, then renames it back afterwards – David Mihal Mar 09 '18 at 15:29

0 Answers0