Contents

Views 4544 Comment 0
Atachment
Attachment '1'
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

Install Node.js and npm using Homebrew on OS X and macOS

Use Homebrew to install and update Node.js on Mac

node01.jpg


Before we get started, are you listening to JS Party? If not, you should be! Maybe start with our episode all about best practices for Node developers. ✊

The default method for installing Node.js is to download a pre-built installer for your platform, install it and make sure it’s on your $PATH.

However, if you’re a Homebrew fan like me and prefer to install all of your packages with it — ensuring your packages are installed using the same commands and directories and allowing Homebrew to easily manage upgrades and updates — then this guide will help you get started.

Install Node.js and npm with Homebrew

First, install Homebrew.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then run brew update to make sure Homebrew is up to date.

brew update

As a safe measure you should run brew doctor to make sure your system is ready to brew. Run the command below and follow any recommendations from brew doctor.

brew doctor

Next, add Homebrew’s location to your $PATH in your .bash_profile or .zshrc file.

export PATH="/usr/local/bin:$PATH"

Next, install Node (npm will be installed with Node):

brew install node

To test out your Node and npm install, try installing Grunt (you might be asked to run with sudo):

npm install -g grunt-cli

If that worked then congratulations — you’ve installed Node.js, npm, and Grunt.

If not — retrace your steps or post a question to Stack Overflow.


출처: https://changelog.com/posts/install-node-js-with-homebrew-on-os-x





?

List of Articles
No. Category Subject Author Date Views
1021 Develop [c] 재미있는 코딩.. file hooni 2003.04.23 23274
1020 Etc 이클립스(Eclipse) 유용한 단축키 ㅋㅋ hooni 2013.04.23 23195
1019 Etc 아두이노 관련 정보.. hooni 2013.04.23 22999
1018 PPT [ajax] 크로스 도메인(Cross Domain) 이슈 해결 방안 file hooni 2013.04.23 22956
1017 Develop 프로그래밍에서 foo, bar 함수의 유래 file hooni 2013.06.25 22882
1016 Develop [c++] 디렉토리 내의 파일 찾기 FindFirstFile() 함수 6 hooni 2013.04.23 22881
1015 Develop [c] 이진트리/트리 순회법 코드(전위/중위/후위) 5 file hooni 2015.07.02 22699
1014 Etc [link] iOS(아이폰) 개발 관련 ㅋㅋ hooni 2013.04.23 22633
1013 Develop [android] [번역] 안드로이드 Android Cloud to Device Messaging(C2DM) hooni 2013.04.23 22609
1012 System/OS [windows] 윈도우 사용자 계정 로그인 암호 분실, 암호 변경하는 방법 file hooni 2015.07.09 22540
1011 Develop [c] 포인터 학습용 예제 소스 코드 file hooni 2013.04.23 22217
1010 Etc [flash] 자동차 엔진의 원리 (4행정 사이클 그림) file hooni 2013.04.23 22160
Board Pagination Prev 1 ... 9 10 11 12 13 14 15 16 17 18 ... 99 Next
/ 99