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
#cd node
#make install

next step is configure npm kamu

ini error muncul waktu coba jalankan perintah

curl | 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:'

this is how to fix it

curl -L -o -| sudo sh

walla your npm in now installed

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s