12

I use a lot of private node packages (stored on my personal github repositories) in my projects:

"devDependencies": {
  ...
  "my-package": "github:username/my-package#master"
  ...
}

my issues is that, when updating a project or when running npm install, the process takes so long (~ 2 mins), while it's stuck doing something like:

reify:my-package: timing reify:loadBundles Completed in 0ms

Is there anything I can do to speed up the processes when using private repos?

Thanks

Frank
  • 2,083
  • 8
  • 34
  • 52
  • 2
    npm install has been awfully slow since npm 7, it can get stuck for minutes in this `reify` not just with private repos but public packages too. although private repos can be notoriously slower. – Lucas Flicky May 01 '21 at 22:00
  • Have you tried the options listed on this thread? https://stackoverflow.com/questions/41524903/why-is-npm-install-really-slow – jasonandmonte May 25 '21 at 21:13

1 Answers1

4

This isn't a problem with Private repositories or GitHub, NPM itself has been very slow recently. You might want to go with a faster alternative like yarn, It's much faster and can save a ton of time.

Installation of Yarn

To install Yarn you just have to run npm install yarn -g. That will install yarn globally.

Commands of Yarn

This cheat sheet of Yarn alternatives to NPM commands can help - https://shift.infinite.red/npm-vs-yarn-cheat-sheet-8755b092e5cc

Hope it helped :)

FrostyTheDumDum
  • 123
  • 1
  • 4