[npm install]Error: EACCES: permission denied, access '/user/local/lib/node_modules'

WINSCA, Han·2021년 5월 29일
0


이제 막 시작인데.. npm 설치 시작부터 오류가 주르륵 뜬다.
역시 뭔말인지 모르므로 구글링...
맥북에서의 npm 설치는 관리자권한 설정이 필요한 경우가 있기 때문에 무작정 install 을 했다가는 이런 오류가 뜨게 된다. 간단한 방법은 설치명령어 앞에 'sudo'를 붙여주는 것이다. 관리자권한을 주는 방법들도 있지만 난 그냥 이 방법으로 하기로 했다.
npm에 이어 expo-cli 설치시에도 "sudo npm install -g expo-cli" 라고 명령하면 무사히 expo도 설치된다. 물론 이 모든 과정은 터미널에서 진행한다.
+++++
It's just starting.. Errors are popping up from the start of npm installation.
I don't know what you're talking about, so I googled it...
Since npm installation on MacBook sometimes requires administrator rights settings, this error will appear if you try to install blindly. A simple way is to prefix the installation command with sudo. There are ways to give administrator rights, but I just decided to do it this way.
When installing expo-cli following npm, command "sudo npm install -g expo-cli" to install expo safely. Of course, all of this is done in the terminal.

profile
코딩초보의 코딩적응기 Coding adaptor for beginners

0개의 댓글