0

I am on the latest High Sierra build.

When I am installing an npm (node), it takes up to 8 minutes to install...

  /usr/local/Cellar/node/8.5.0: 4,152 files, 47.8MB, built in 7 minutes 51 seconds

Is this normal behaviour?

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
yooouuri
  • 2,578
  • 10
  • 32
  • 54
  • Why don't you use the official Node.js installer (https://nodejs.org/en/)? – robertklep Sep 14 '17 at 09:38
  • Because i am using homebrew for more than node, some missing programs etc. – yooouuri Sep 14 '17 at 09:40
  • I use Homebrew as well, but _also_ use the official Node.js installer. The Homebrew-installed Node.js can cause all kinds of issues (judging by the amount of questions being posted here on StackOverflow). FWIW, it's probably taking that much time because it's being compiled from source, instead of being a binary install. – robertklep Sep 14 '17 at 09:43

1 Answers1

1

It is not normal. I should take longer if you're building from the sources and shorter if you're installing the binary packages. See the install options at:

Also you can see this tutorial on installing Node using any type of those packages (binary and source) with exact commands that you need to run:

I never recommend installing a programming language runtime (Node, Python, Ruby, Perl etc.) with anything other than official packages because it can cause all sorts of problems. Those runtimes have their own package manager s that you should use to install modules and libraries and using something else for that can cause hard to track problems and is usually not worth the hassle. The only tool that I can recommend here is nvm because I've read its source code and I know what it's doing, though I would never run the recommended way of piping the curl output straight to bash without seeing what I downloaded first.

rsp
  • 107,747
  • 29
  • 201
  • 177