npm syntax error near unexpected token `newline’

kalau kamu error waktu install npm pastiin kamu install node js dengan baik dan benar

step instal node js

#git clone https://github.com/joyent/node.git
#cd node
#./configure
#make
#make install

next step is configure npm kamu


ini error muncul waktu coba jalankan perintah

curl http://npmjs.org/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 85 0 85 0 0 166 0 --:--:-- --:--:-- --:--:-- 334
sh: line 1: syntax error near unexpected token `newline'
sh: line 1: `Moved: https://npmjs.org/install.sh'

this is how to fix it

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

walla your npm in now installed

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s