user3180105
user3180105

Reputation: 381

trouble installing npm via terminal

I'm trying to install npm via the terminal but the instructions I'm finding everywhere aren't working.

Here's what I see:

192:~ Home$ curl http://npmjs.org/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100   193  100   193    0     0    892      0 --:--:-- --:--:-- --:--:--   893
sh: line 1: html: No such file or directory
sh: line 2: syntax error near unexpected token `<'
'h: line 2: `<head><title>301 Moved Permanently</title></head>

As far as I can tell, all the information is correct. Of course, I'm new to most of this stuff...

Am I doing something wrong - or do I need to be downloading it from somewhere else?

Upvotes: 0

Views: 148

Answers (1)

Quentin
Quentin

Reputation: 944294

Use the -L flag to make curl follow HTTP redirects.

curl -L http://npmjs.org/install.sh | sh

Upvotes: 2

Related Questions