1

Please help me to clear this error

Apples-Mac-mini:bin apple$ curl -L 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    244      0 --:--:-- --:--:-- --:--:--   471
100  6711  100  6711    0     0    431      0  0:00:15  0:00:15 --:--:--  5456
sh: line 20: npm-install-3294.sh: Permission denied
sh: npm-install-3294.sh: No such file or directory
rm: npm-install-3294.sh: No such file or directory

2 Answers 2

2

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

Note the sudo in front. The errors you get are due to installer trying to copy files to system folders, requiring administrative permissions.

Also, you do not actually need to install NPM, as it is included in latest Node.js versions. To install Node.js on MacOS, refer to their official site.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Friend Alandarev
0

To fix it, run sh using sudo:

$ curl http://npmjs.org/install.sh | sudo sh

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.